Graphs with JavaScript, adventure game tutorial

This is a tutorial on graph algorithms. It is using adventure .

Install this adventure with

npm install -g graphs-with-javascript

and then use


to start your adventure!

Note for Windows users:You have to download Node.js v0.12.6 for Windows since adventure will not work with 4.x yet. See this bug.

What you will learn

Goal is to write a number of different exercises which will give you a good understanding of graphs and using them to solve various types of problems. More exercises will be added. Current progress:

v problem         v verifier           v
                             | written         | written            | done
Introduction ————————————————·—————————————————·————————————————————O
Get started with this adventure and verify your first exercise.

Vertices + Edges ————————————·—————————————————·————————————————————O
Create a data structure for edges and vertices; preparation for
later exercises.

Graphs ——————————————————————·—————————————————·————————————————————O
Create a Graph data structure which manages the vertices and edges
from the previous exercise.

Reading Problems ————————————·—————————————————·————————————————————O
Read large graphs from files.

Under Siege —————————————————·——————————————
Help the city Bohandur, which is under siege, to defend itself 
with your new knowledge!


I’m very interested in reading your feedback to the exercises, like:

  • Did you miss some information which would have been required for solving the exercise?
  • Was an exercise too hard?
  • Did the verification fail, or was the master solution wrong?
  • Did you like it?

Please feel free to open a thread (issue) in the GitHub Issue Tracker and drop some lines of text or code, so this tutorial can be further improved. Thank you!

Github责编内容来自:Github (源链) | 更多关于

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 综合技术 » Graphs with JavaScript, adventure game tutorial

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录