[C++] AI: find the shortest path (using the A* method)
You want to go from A to B the shortest path possible, how do you program that?
Not quite easy, but luckily its documentated: GameDev.net - A* Pathfinding for Beginners
So, I made a class that will calculate the shortest path. And I will release it here to anyone who would like to use it. I added comments aswell, so you can follow what happening :)
Any advice/comments: I'd love to hear some, the code can prolly be optimized and it would be great if I learn from my faults ;).
You can download it here: Astar.zip ~ 3KiB (code is ~9KiB)