Esempio n. 1
0
        public void FighterFactory_AutoInitializesHumanFighters_GodRelationshipManagerSet()
        {
            FighterFactory.SetGodRelationshipManager(_relationshipManager);
            _fighter = (HumanFighter)FighterFactory.GetFighter(FighterType.HumanControlledPlayer, 1);

            Assert.DoesNotThrow(() => _relationshipManager.GetFighterRelationshipValue(_fighter, GodEnum.MachineGod));
        }
Esempio n. 2
0
        public void SetUp()
        {
            _relationshipManager = new GodRelationshipManager();
            _allGodValues        = EnumHelperMethods.GetAllValuesForEnum <GodEnum>();

            FighterFactory.SetGodRelationshipManager(_relationshipManager);
            _fighter = (HumanFighter)FighterFactory.GetFighter(FighterType.HumanControlledPlayer, 1);
        }
Esempio n. 3
0
        static void Main()
        {
            FighterFactory.SetGodRelationshipManager(Globals.GodRelationshipManager);
            EventHandlerPrinter printer = new EventHandlerPrinter(Globals.Output);

            const string testBattleOptionText = "Test Battle ('test')";
            const string campaignOptionText   = "Play the \"Campaign\" mode ('campaign')";
            //const string demoOptionText = "Play the \"Demo\" mode (fewer battles per region)";

            List <MenuAction> menuActions = new List <MenuAction>
            {
                new MenuAction(testBattleOptionText, "test"),
                new MenuAction(campaignOptionText, "campaign"),
                new MenuAction("exit")
            };

            Menu selectGameplayModeMenu = new Menu(false, false, false, "What mode would you like to play?", null,
                                                   null, menuActions, Globals.Input, Globals.Output);

            bool continuer = true;

            RegionManager regionManager;

            while (continuer)
            {
                Globals.Output.ClearScreen();
                regionManager = Globals.RegionManager;

                selectGameplayModeMenu.Build(null, null, null, null);
                MenuSelection gameplayModeSelection = selectGameplayModeMenu.GetInput();

                switch (gameplayModeSelection.Description)
                {
                case testBattleOptionText:
                    Foo();
                    break;

                case campaignOptionText:
                    TutorialScreens();

                    SetupPlayers(out var playerOne, out var playerTwo, printer);

                    MenuManager   menuManager = new MenuManager(Globals.Input, Globals.Output, Globals.MenuFactory);
                    var           playerTeam  = new Team(menuManager, playerOne, playerTwo);
                    BattleManager manager     = new BattleManager(Globals.ChanceService, Globals.Input, Globals.Output);

                    Globals.RegionManager.Battle(manager, playerTeam);

                    break;

                case "exit":
                    continuer = false;
                    break;
                }
            }
        }
Esempio n. 4
0
        public void SetUp()
        {
            _output        = new MockOutput();
            _input         = new MockInput();
            _chanceService = new MockChanceService();

            _relationshipManager = new GodRelationshipManager();
            FighterFactory.SetGodRelationshipManager(_relationshipManager);
            _menuFactory = new MockMenuFactory();


            _decisionManager = new DecisionManager(_relationshipManager, null, _menuFactory, _input, _output);
        }