Пример #1
0
        protected override void ExecuteInsertUnitCommand(string[] commandWords)
        {
            switch (commandWords[1])
            {
            case "Marine":
                var marine = new Marine(commandWords[2]);
                this.InsertUnit(marine);
                break;

            case "Tank":
                var tank = new Tank(commandWords[2]);
                this.InsertUnit(tank);
                break;

            case "Parasite":
                var parasite = new Parasite(commandWords[2]);
                this.InsertUnit(parasite);
                break;

            case "Queen":
                var queen = new Queen(commandWords[2]);
                this.InsertUnit(queen);
                break;

            default:
                base.ExecuteInsertUnitCommand(commandWords);
                break;
            }
        }
Пример #2
0
        protected override void ExecuteInsertUnitCommand(string[] commandWords)
        {
            switch (commandWords[1])
            {
                case MarineInsertCase:
                    {
                        var marine = new Marine(commandWords[2]);
                        this.InsertUnit(marine);
                        break;
                    }
                case TankInsertCase:
                    {
                        var tank = new Tank(commandWords[2]);
                        this.InsertUnit(tank);
                        break;

                    }
                case QueenInsertCase:
                    {
                        var queen = new Queen(commandWords[2]);
                        this.InsertUnit(queen);
                        break;
                    }
                case ParasiteInsertCase:
                    {
                        var parasite = new Parasite(commandWords[2]);
                        this.InsertUnit(parasite);
                        break;
                    }
                default:
                    base.ExecuteInsertUnitCommand(commandWords);
                    break;
            }
        }
        protected override void ExecuteInsertUnitCommand(string[] commandWords)
        {
            var unitType = commandWords[1];
            var unitId   = commandWords[2];

            Unit unitToBeAdded = null;

            switch (unitType)
            {
            case "Marine":
                unitToBeAdded = new Marine(unitId);
                break;

            case "Parasite":
                unitToBeAdded = new Parasite(unitId);
                break;

            case "Queen":
                unitToBeAdded = new Queen(unitId);
                break;

            case "Tank":
                unitToBeAdded = new Tank(unitId);
                break;

            default:
                base.ExecuteInsertUnitCommand(commandWords);
                break;
            }

            if (unitToBeAdded != null)
            {
                this.InsertUnit(unitToBeAdded);
            }
        }
 protected override void ExecuteInsertUnitCommand(string[] commandWords)
 {
     switch (commandWords[1])
     {
         case "Marine":
             var marine = new Marine(commandWords[2]);
             this.InsertUnit(marine);
             break;
         case "Tank":
             var tank = new Tank(commandWords[2]);
             this.InsertUnit(tank);
             break;
         case "Parasite":
             var parasite = new Parasite(commandWords[2]);
             this.InsertUnit(parasite);
             break;
         case "Queen":
             var queen = new Queen(commandWords[2]);
             this.InsertUnit(queen);
             break;
         default:
             base.ExecuteInsertUnitCommand(commandWords);
             break;
     }
 }
Пример #5
0
 protected virtual void ExecuteInsertUnitCommand(string[] commandWords)
 {
     switch (commandWords[1])
     {
         case "Dog":
             var dog = new Dog(commandWords[2]);
             this.InsertUnit(dog);
             break;
         case "Human":
             var human = new Human(commandWords[2]);
             this.InsertUnit(human);
             break;
         case "Tank":
             var tank = new Tank(commandWords[2]);
             this.InsertUnit(tank);
             break;
         case "Marine":
             var marine = new Marine(commandWords[2]);
             this.InsertUnit(marine);
             break;
         case "Parasite":
             var parasite = new Parasite(commandWords[2]);
             this.InsertUnit(parasite);
             break;
         case "Queen":
             var queen = new Queen(commandWords[2]);
             this.InsertUnit(queen);
             break;
         default:
             break;
     }
 }
        protected override void ExecuteInsertUnitCommand(string[] commandWords)
        {
            var unitType = commandWords[1];
            var unitId = commandWords[2];

            Unit unitToBeAdded = null;

            switch (unitType)
            {
                case "Marine":
                    unitToBeAdded = new Marine(unitId);
                    break;
                case "Parasite":
                    unitToBeAdded = new Parasite(unitId);
                    break;
                case "Queen":
                    unitToBeAdded = new Queen(unitId);
                    break;
                case "Tank":
                    unitToBeAdded = new Tank(unitId);
                    break;
                default:
                    base.ExecuteInsertUnitCommand(commandWords);
                    break;
            }

            if (unitToBeAdded != null)
            {
                this.InsertUnit(unitToBeAdded);
            }
        }
Пример #7
0
        protected override void ExecuteInsertUnitCommand(string[] commandWords)
        {
            switch (commandWords[1])
            {
            case "Tank":
                var tank = new Tank(commandWords[2]);
                this.InsertUnit(tank);
                break;

            case "Marine":
                var marine = new Marine(commandWords[2]);
                marine.AddSupplement(new WeaponrySkill());
                this.InsertUnit(marine);
                break;

            case "Parasite":
                var par = new Parasite(commandWords[2]);

                this.InsertUnit(par);
                break;

            case "Queen":
                var q = new Queen(commandWords[2]);

                this.InsertUnit(q);
                break;

            default:
                base.ExecuteInsertUnitCommand(commandWords);
                break;
            }
        }
 protected override void ExecuteInsertUnitCommand(string[] commandWords)
 {
     switch (commandWords[1])
     {
         case "Tank":
             var tank = new Tank(commandWords[2]);
             base.InsertUnit(tank);
             break;
         case "Marine":
             var marine = new Marine(commandWords[2]);
             base.InsertUnit(marine);
             break;
         default:
             base.ExecuteInsertUnitCommand(commandWords);
             break;
     }
 }
        protected override void ExecuteInsertUnitCommand(string[] commandWords)
        {
            switch (commandWords[1])
            {
            case "Tank":
                var tank = new Tank(commandWords[2]);
                base.InsertUnit(tank);
                break;

            case "Marine":
                var marine = new Marine(commandWords[2]);
                base.InsertUnit(marine);
                break;

            default:
                base.ExecuteInsertUnitCommand(commandWords);
                break;
            }
        }