/AStar-Pathfinder

A* Pathfinder Algorithm Visualization in PyGame

Primary LanguagePython

PyGame A* Pathfinder Visualization

To run the project, simply run main.py

python3 main.py

Requirements

  • Python 3.x
  • PyGame 2.0.0

Usage

The A* Pathfinder Algorithm Visualization tool works as following:

  • Left click on any node to mark it
    • First node marked is the "Start Node"
    • Second node marked is the "End Node"
    • All other nodes marked are "Barrier Nodes"
  • Right click on any node to unmark it
  • Press the space key to start the algorithm
  • Press the C key to clear the screen

The nodes are colour-marked as follows:

  • Orange = Start Node
  • Turquoise = End node
  • Black = Barrier Node
  • Purple = Path Node
  • White = Empty Node
  • Green = Open Node (Still in consideration)
  • Red = Closed Node (Not in consideration anymore)

Run in GitPod

You can run the code in GitPod, a free online dev environement for GitHub

Open in Gitpod