Exemplo n.º 1
0
 public void PersonalityQuiz(HumanFighter fighter1, HumanFighter fighter2,
                             bool randomizeAnswers = false, IChanceService chanceService = null)
 {
     _realDecisionManager.PersonalityQuiz(fighter1, fighter2, randomizeAnswers, chanceService);
 }
Exemplo n.º 2
0
 public TeamFactory(IChanceService chanceService, IMenuFactory menuFactory)
 {
     _chanceService = chanceService;
     _menuFactory   = menuFactory;
 }
Exemplo n.º 3
0
 public FakeBattleManager(IChanceService chanceService, IInput input, IOutput output)
     : base(chanceService, input, output)
 {
 }
Exemplo n.º 4
0
 public BattlefieldFactory(ITeamFactory teamFactory, GroupingFactory groupingFactory, IMenuFactory menuFactory, IChanceService chanceService)
 {
     _teamFactory     = teamFactory;
     _groupingFactory = groupingFactory;
     _menuFactory     = menuFactory;
     _chanceService   = chanceService;
 }
Exemplo n.º 5
0
        public IMenu GetMenu(MenuType type, IInput menuInput = null, IOutput menuOutput = null, bool allowBack = false,
                             bool allowHelp  = true, bool allowStatus = true, string prompt = "", string errorText = "",
                             string helpText = "",
                             List <MenuAction> menuActions = null, List <MenuAction> specialMenuActions = null,
                             bool shuffleOptions           = false, IChanceService chanceService = null,
                             IMenu subMenu = null)
        {
            if (menuInput == null)
            {
                menuInput = new ConsoleInput();
            }
            if (menuOutput == null)
            {
                menuOutput = new ConsoleOutput();
            }
            if (errorText == null)
            {
                errorText = Globals.GenericErrorMessage;
            }
            if (menuActions == null)
            {
                menuActions = new List <MenuAction>();
            }
            if (chanceService == null)
            {
                chanceService = Globals.ChanceService;
            }

            IMenu ret;

            switch (type)
            {
            case MenuType.NonSpecificMenu:
                ret = _CreateBasicMenu(menuInput, menuOutput, allowBack, allowHelp, allowStatus, prompt, errorText, helpText, menuActions, shuffleOptions, chanceService);
                break;

            case MenuType.ConfirmationMenu:
                ret = _CreateConfirmationMenu(prompt, allowBack, menuInput, menuOutput);
                break;

            case MenuType.TutorialMenu:
                ret = _CreateConfirmationMenu("Would you like a quick tutorial on how to play SimpleRPG? (y/n also accepted)", false, menuInput, menuOutput);
                break;

            case MenuType.BattleMenu:
                ret = _CreateBattleMenu(menuInput, menuOutput, allowBack, specialMenuActions);
                break;

            case MenuType.ChooseTargetMenu:
                ret = _CreateSelectTargetMenu(menuInput, menuOutput);
                break;

            case MenuType.ChooseAttackTypeMenu:
                ret = _CreateChooseAttackTypeMenu(menuInput, menuOutput);
                break;

            case MenuType.ChooseSpellMenu:
                ret = _CreateChooseSpellMenu(menuInput, menuOutput);
                break;

            case MenuType.ChooseSpecialAttackMenu:
                ret = _CreateChooseSpecialMoveMenu(menuInput, menuOutput);
                break;

            case MenuType.ChooseSpecialOptionMenu:
                ret = _CreateChooseSpecialOptionMenu(menuInput, menuOutput, menuActions);
                break;

            case MenuType.KeysOffOwnerNumberInputMenu:
                ret = _CreateKeysOffOwnerNumberInputMenu(prompt, menuInput, menuOutput, subMenu);
                break;

            default:
                ret = _CreateBattleMenu(menuInput, menuOutput, allowBack, specialMenuActions);
                break;
            }

            return(ret);
        }
Exemplo n.º 6
0
 private static Menu _CreateBasicMenu(IInput menuInput, IOutput menuOutput, bool allowBack,
                                      bool allowHelp, bool allowStatus, string prompt, string errorText,
                                      string helpText, List <MenuAction> menuActions, bool shuffleOptions, IChanceService chanceService)
 {
     return(new Menu(allowBack, allowHelp, allowStatus, prompt, errorText, helpText, menuActions, menuInput, menuOutput, chanceService, shuffleOptions));
 }
Exemplo n.º 7
0
 public TestTeamFactory(IChanceService chanceService, IMenuFactory menuFactory = null)
 {
     _chanceService   = chanceService;
     _realTeamFactory = new TeamFactory(chanceService, menuFactory ?? Globals.MenuFactory);
     _teams           = new Queue <Team>();
 }