A* Pathfinding in Java