示例#1
0
        public void Setup()
        {
            _fighter = new TestHumanFighter("Hero", 1);
            _fighter.SetHealth(FighterHealth);
            _fighter.SetMana(FighterMana);
            _fighter.SetStrength(FighterAttack);
            _fighter.SetDefense(FighterDefense);
            _fighter.SetSpeed(FighterSpeed);
            _fighter.SetEvade(FighterEvade);
            _fighter.SetLuck(FighterLuck);

            _factoryFighter = (TestHumanFighter)TestFighterFactory.GetFighter(TestFighterType.TestHuman, 1, "Ted");
            _factoryFighter.AddSpell(SpellFactory.GetSpell(MagicType.Fire, 1));
            _enemy             = (TestEnemyFighter)TestFighterFactory.GetFighter(TestFighterType.TestEnemy, 1, "enemy");
            _armoredEnemy      = (TestEnemyFighter)TestFighterFactory.GetFighter(TestFighterType.TestEnemy, 1, "armored");
            _superArmoredEnemy = (TestEnemyFighter)TestFighterFactory.GetFighter(TestFighterType.TestEnemy, 1, "super armored");

            _input         = new MockInput();
            _output        = new MockOutput();
            _menuManager   = new TestMenuManager(_input, _output);
            _chanceService = new MockChanceService();

            _battleManager = new TestBattleManager(_chanceService, _input, _output);

            var humanTeam = new Team(_menuManager, _fighter);

            _battleManager.SetHumanTeam(humanTeam);

            var enemyTeam = new Team(_menuManager, _enemy);

            _battleManager.SetEnemyTeam(enemyTeam);

            _battleManager.SetConfig(new BattleManagerBattleConfiguration());
        }