コード例 #1
0
 protected override 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 "Queen":
             var queen = new Queen(commandWords[2]);
             this.InsertUnit(queen);
             break;
         case "Marine":
             var marine = new Marine(commandWords[2]);
             this.InsertUnit(marine);
             break;
         case "Parasite":
             var paro = new Parasite(commandWords[2]);
             this.InsertUnit(paro);
             break;
         default:
             break;
     }
 }
コード例 #2
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;
         default:
             break;
     }
 }
コード例 #3
0
ファイル: ExtendedHoldingPen.cs プロジェクト: stoyans/Telerik
 protected override void ExecuteInsertUnitCommand(string[] commandWords)
 {
     switch (commandWords[1])
     {
         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;
         case "Human":
             var human = new Human(commandWords[2]);
             this.InsertUnit(human);
             break;
         default: base.ExecuteInsertUnitCommand(commandWords);
             break;
     }
 }