A* pathfinding works (also draws map), but buggy

Help?
minor
Upgraded, fixed some bugs

Weird rare bugs are present
Completed A* 2D, no stupid crashing.

Tries 32 times until stops. If difficult labyrinth, then run again with
the same coords.
Merge pull request #6 from Akuukis/A-star-2D

Ready to implement