Naive implementation of pathfinding.