The algorithm is similar to Dijkstra's algorithm but uses a heuristic, the distance between the nodes, to better explore.
The algorithm can travel diagonally or in a straight direction by 1 square at a time.
- Left click on a tile to place an obstacle
- Right click on an obstacle to remove it
- Scroll wheel click to place the start block
- Scroll wheel click a second time to place the end block
- Scroll wheel click on a start/end block to remove it
- Press backspace to clear the grid
- Press spacebar to begin the pathfinding process (then click it again after it has finished to continue)
- Grid dimensions, size, and colors as well as delay can be changed in the code
- Black - Obstacle
- White - Empty
- Red - Start
- Blue - End
- Yellow - Explored Nodes
- Green - Path