Beispiel #1
0
 public void MoveOverPath(Graph pointGraph, Point point)
 {
     //Berekent de route oor middel van Dijkstra en volgt die route als de task "RobotMove" aan de beurt is.
     _desiredPoint = point;
     if (route.Count == 1)
     {
         route = DijkstraClass.Dijkstra(pointGraph, currentPoint, desiredPoint);
     }
     if (IsOnPoint(this, route[1]))
     {
         this.CurrentPoint(route[1]);
         if (route.Count != 1)
         {
             route.RemoveAt(0);
         }
     }
 }
Beispiel #2
0
 public void MoveOverPath(Graph pointGraph, Point point)
 {
     //calculates the route the chest takes with the dijkstra algorithm and then proceeds to use it in RobotMove.
     _desiredPoint = point;
     if (route.Count == 1)
     {
         route = DijkstraClass.Dijkstra(pointGraph, currentPoint, desiredPoint);
     }
     if (IsOnPoint(this, route[1]))
     {
         this.CurrentPoint(route[1]);
         if (route.Count != 1)
         {
             route.RemoveAt(0);
         }
     }
 }