Esempio n. 1
0
 public void UnSubscribe()
 {
     for (int i = 0; i < FirstArmy.Count(); i++)
     {
         FirstArmy[i].EventHandler -= PlayMusic;
     }
     for (int i = 0; i < SecondArmy.Count(); i++)
     {
         SecondArmy[i].EventHandler -= PlayMusic;
     }
 }
Esempio n. 2
0
        public void Step()
        {
            if (GameOver)
            {
                StepInfo = "\n\n\t\t\t------ИГРА ОКОНЧЕНА!!! Создайте новые армии!------";
                return;
            }
            else
            {
                StepInfo = "\n\n\t\t\t|---|---БИТВА---|---|\n";
                Fight(FirstArmy, SecondArmy);
                Fight(SecondArmy, FirstArmy);
                DoSpecialAction(FirstArmy, SecondArmy);
                DoSpecialAction(SecondArmy, FirstArmy);

                if (FirstArmy.Count() == 0 || SecondArmy.Count() == 0)
                {
                    GameOver = true;
                }
            }
        }