Example #1
0
        public TimeSpan GetFlyDuration(City a, City b)
        {
            int distance = CityCatalog.GetDistance(a, b);

            return(TimeSpan.FromHours(distance / Speed));
        }
Example #2
0
 public bool CanFlyTo(City city) => city != Location &&
 CityCatalog.GetDistance(Location, city) <= DistanceFly;