move c# pathfinding code