// taxi to the runway public bool Taxi(string RunwayID, ATC_Contract contract) { bool returnme = false; //check if command allowed: first check if the runway isnt taken if (isCommandAllowed("taxi")) { returnme = true; switch (RunwayID) { case "R1": this.Status = AStatus.Taxi_R1; break; case "R2": this.Status = AStatus.Taxi_R2; break; case "R3": this.Status = AStatus.Taxi_R3; break; } this.Runway = contract.getRunway(RunwayID); this.Runway.Status = false; } return(returnme); }
public bool TakeOff(string RunwayID, ATC_Contract contract) { bool returnme = false; if (isCommandAllowed("takeoff")) { Status = AStatus.Taking_Off; returnme = true; } return(returnme); }
public bool Land(string RunwayID, ATC_Contract contract) { if (isCommandAllowed("land")) { //if its waiting for emergency, we have a emergency landing process if (this.Status == AStatus.Emergency) { this.Status = AStatus.Emergency_landing; } else { this.Status = AStatus.Landing; } this.Runway = contract.getRunway(RunwayID); this.Runway.Status = false; return(true); } return(false); }