Ejemplo n.º 1
0
 public void AddStack(UnitsStack other)
 {
     if (Size > 5)
     {
         throw new Exception("Failed to add Stack to army");
     }
     _army[Size] = new BattleUnitsStack(other);
     Size++;
 }
Ejemplo n.º 2
0
 public BattleArmy(Army pattern)
 {
     IsDefeated = false;
     _army      = new BattleUnitsStack[6];
     Size       = pattern.Size;
     UnitsStack[] tmp = pattern.GetArmy();
     for (int i = 0; i < Size; i++)
     {
         _army[i] = new BattleUnitsStack(tmp[i]);
     }
     for (int i = Size; i < 6; i++)
     {
         _army[i] = new BattleUnitsStack();
     }
 }
Ejemplo n.º 3
0
 public void TakeAttack(BattleUnitsStack attacker, int num)
 {
     _army[num].TakeAttack(attacker);
 }