Ejemplo n.º 1
0
 private void HandleArrival()
 {
     if (CurrentOrder != null)
     {
         CurrentRoute !.Destination.DeliverOrder(CurrentOrder);
     }
     CurrentOrder    = null;
     CurrentLocation = CurrentRoute !.Destination;
     if (IsAtHome)
     {
         SetRoute(null);
     }
     else
     {
         var routeBackHome = routePlanner.PlanRoute(CurrentLocation.Name, HomeLocation.Name);
         SetRoute(routeBackHome);
     }
 }