A Puzzle game - find shortest distance from one point to another.
-
This project is a part of General Assembly's SEIF (Software Engineering Immersive Flex) Bootcamp course with following requirement:
- Project Goal: Create a game using HTML, CSS and Javascript.
- Duration: 2 weeks.
-
I was learning about Graph data structure and came across Dijkstra's algorithm(algorithm to find shortest path in between two points). Around the same time, we were tasked to develop a game as part of Bootcamp project. So I thought, why not come out with a game that is using this algorithm.
-
Taking google map as an analogy, one of feature is finding shortest route from starting point to destination point. This project does the same by employing Dijkstra's algorithm.
The codes in general is split into two parts:
-
Algorithm Part:
- Generation of Graph with randomized distance in between Nodes.
- Solution using Dijkstra's algorithm.
-
User Interface Part:
- Display generated Graph.
- Handling of user interaction.
-
-
Link to access the game.
-
-
Goal: Connect preselected Starting Node (point) to indicated Destination Node using shortest sum.
-
Repeated click on last selected Node would select and un-select it
-
Buttons:
- [New Game] - reset to a fresh New Game.
- [Next Level] - move to Next Unlocked Level.
- [Previous Level] - move to Previous Level.
-
To win: Complete all 3 levels or score 60 points within time limit.
-
I would appreciate any comments and feedback anyone has. You can reach me at [email protected].