public void RemoveFromQueue() { Airplane airplaneToLand = LandingQueue.DequeueHighestPriority(); if (airplaneToLand != null) { LanesTaken++; airplaneToLand.SetStatusToLanding(); } }
public bool RequestLandingPermission(Airplane a) { if (LanesTaken < Lanes) { LanesTaken++; //set status to landing --> free lane return(true); } else { LandingQueue.AddPlaneToQueue(a); //plane has to circle until it is removed from the queue. return(false); } }