Ejemplo n.º 1
0
 public int ClashWith(Warrior other)
 {
     return(Power.CompareTo(other.Power));
 }
Ejemplo n.º 2
0
 public int ClashWith(Warrior other)
 {
     return Power.CompareTo(other.Power);
 }
Ejemplo n.º 3
0
 private Warrior[] GetWarriors(string[] warriorCharacters)
 {
     Warrior[] warriors = new Warrior[warriorCharacters.Length];
     for (int i = 0; i < warriorCharacters.Length; i++)
     {
         switch (warriorCharacters[i])
         {
             case "t":
                 warriors[i] = new Turtle(i);
                 break;
             case "m":
                 warriors[i] = new Monkey(i);
                 break;
             default:
                 warriors[i] = new Pigeon(i);
                 break;
         }
     }
     return warriors;
 }