/A-Star-Sharp

A small, easy to understand C# implementation of the A Star pathfinding algorithm for 2D grid based applications.

Primary LanguageC#MIT LicenseMIT

A-Star-Sharp

A small, easy to understand C# implementation of the A Star pathfinding algorithm for 2D grid based applications, and games.

In my searching, I couldn't find a very straightforward A Star implementation in C#, so I wrote one.

Code improvements to be made soon:

  1. Use of priority queue to hold the nodes, currently a sorted list.
  2. Add functionality to consider all eight possible adjacent nodes.

For an example of how this is used:

Check out my "prototype" repository, prototype/Engine/AI/Astar.cs, and prototype/Engine/Region.cs is where the grid is built, paths are found, etc.