public void LandPlaneByFirm(Planelist list) { foreach (Plane p in list.GetListByFirm(Firm)) { if (airPort.HasFreeStrip && p.Status == PlaneStatus.Fly) { p.StartLanding(airPort.GetFreeStrip()); } } }
public void LandPlaneByFuel(Planelist list) { list.Sort(delegate(Plane x, Plane y) { if (x.Fuel > y.Fuel) { return(1); } else { return(-1); } }); foreach (Plane p in list) { if (airPort.HasFreeStrip && p.Status == PlaneStatus.Fly) { p.StartLanding(airPort.GetFreeStrip()); } } }