Python program to visualise the A-Star pathfinding algorithm using the pygame library.
I tried to use objects instead of arrays this time.
The only valid ways to travel are horizontally or vertically. This is because allowing diagonal movement would make the obstacles irrelevent.
L-CTRL : Resets the board
L-SHIFT : Starts the algorithm
L-MOUSE : First two clicks sets the starting and ending points respectively. The clicks that follow can be used to set obstacles.
R-MOUSE : Undoes the obstacle/start/end points.