A* Pathfinding Algorithm implemented in Python