Пример #1
0
        public void BattleArmy_ContainsStack()
        {
            Unit angel    = new UnitAngel();
            Unit skeleton = new UnitSkeleton();

            UnitsStack stack1 = new UnitsStack(angel, 10);
            UnitsStack stack2 = new UnitsStack(skeleton, 42);

            List <UnitsStack> stacks = new List <UnitsStack> {
                stack1, stack2
            };

            Army       baseArmy = new Army(stacks);
            BattleArmy army     = new BattleArmy(baseArmy, null);

            BattleUnitsStack stack3 = new BattleUnitsStack(new UnitsStack(skeleton, 42), army);

            army.AddStack(stack3);
            Assert.IsTrue(army.ContainsStack(stack3));
        }