Converted pathfinding from A* to greedy search