A* Pathfinding Algorithm implemented in Objective-C