Exemplo n.º 1
0
        public void GetInputs_TeamEntirelyEnemyFighters_DoesNotGetInputFromDefeatedFighters()
        {
            TestEnemyFighter fighter3 = (TestEnemyFighter)TestFighterFactory.GetFighter(TestFighterType.TestEnemy, 1);
            TestEnemyFighter fighter4 = (TestEnemyFighter)TestFighterFactory.GetFighter(TestFighterType.TestEnemy, 1);
            Team             testTeam = new Team(_menuManager, _enemyPlayer1, _enemyPlayer2, fighter3, fighter4);

            _enemyPlayer1.PhysicalDamage(_enemyPlayer1.MaxHealth);
            fighter3.PhysicalDamage(fighter3.MaxHealth);
            fighter4.PhysicalDamage(fighter4.MaxHealth);

            foreach (TestEnemyFighter fighter in testTeam.Fighters.Cast <TestEnemyFighter>())
            {
                fighter.SetMove(_basicAttackMove);
                fighter.SetMoveTarget(_enemyPlayer1);
            }

            List <BattleMoveWithTarget> returnedInputs = testTeam.GetInputs(testTeam);

            Assert.AreEqual(1, returnedInputs.Count);
            BattleMoveWithTarget moveWithTarget = returnedInputs[0];

            Assert.AreEqual(_enemyPlayer2, moveWithTarget.Owner);
        }