Exemple #1
0
        public void SetArmy(Army UserArmy, Army ComputerArmy)
        {
            if (UserArmy == null || ComputerArmy == null)
            {
                throw new Exception("Неправильно введена армия");
            }

            this.ComputerArmy = ComputerArmy;
            this.UserArmy     = UserArmy;
            FirstArmyCount    = UserArmy.UnitList.Count;
            SecondArmyCount   = ComputerArmy.UnitList.Count;
            TurnCounter       = 0;
            Turn        = new Dictionary <int, List <Army> >();
            combatBuild = new LineCombatBuild();
        }
Exemple #2
0
        public void ChangeCombutBuild(int num)
        {
            if (num > 3 || num < 1)
            {
                throw new Exception("Неправильный ввод");
            }

            if (num == 1)
            {
                combatBuild = new LineCombatBuild();
            }

            if (num == 2)
            {
                combatBuild = new TurtelCombatBuild();
            }

            if (num == 3)
            {
                combatBuild = new RankCombutBuild();
            }
        }