Years ago in college I developed the algorithm for A* Pathfinding, however it was more of an theoretical exercise than a piece of code I could use, so with the help of YouTube.com and my old notes I put this together!
The code is simple, give the object a 2D char array, the start location, and the end location and it will spit you out a node with a recursive parent to take you to the end location.
Diagonal movement costs 1.4
vertical/horizontal movement cost 1
Maps only work with (0,ymax) as the top left corner and (xmax,0) as the bottom right corner
ArgumentOutOfRangeException if the end point is unreachable
These limitations will be solved in the next iteration of the A* Pathfinding post
s = start
o = open space
c = …