コード例 #1
0
 public string Land(AerialVehicle a)
 {
     if (this.Vehicles.Count < this.MaxVehicles)
     {
         this.Vehicles.Add(a);
         if (a.currentAltitude > 0)
         {
             a.FlyDown(a.currentAltitude);
         }
         return(string.Format("{0} lands at {1}", a, this.AirportCode));
     }
     return(string.Format($"{this} is full. Can't land here"));
 }
コード例 #2
0
 public string TakeOff(AerialVehicle a)
 {
     this.Vehicles.Remove(a);
     return(a.TakeOff() + " from " + this.AirportCode);
 }