Example #1
0
 public void caculateBestRoute(IRoutePlanningStrategy strategy)
 {
     if (routePlanner.Origin != null && routePlanner.Origin != null)
     {
         routePlanner.SetRouteStrategy(strategy);
         routePlanner.CalculateRoute();
     }
     else
     {
         Console.WriteLine("Please set the origin and destiny first.");
     }
 }
Example #2
0
 public void SetRouteStrategy(IRoutePlanningStrategy routeStrategy)
 {
     _routeStrategy = routeStrategy;
 }