Pathfinding:
INSTRUCTIONS:
-Use mouse to view the world
-Click on a tile to add or remove a wall.
-Press SPACE to set the destination.
-Watch as the blue square travels to its destination around the walls
In this program, the blue square always calculates the shortest path to its destination if it is possible to reach there. This is very useful for programming enemies in games.
I have not put comments in the scripts yet.