Ejemplo n.º 1
0
        // 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);
        }
Ejemplo n.º 2
0
        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);
        }