Adding pathfinding (A*)