public void InstructionsMenu() { //Instructions Menu List <MenuAction> actions = _menuActionService.GetActionsForMenu("Instructions"); string possibleChoices = ""; Console.Write(_textService.GetInfoOn()); foreach (var action in actions) { Console.Write(HelperMethods.Buttonize(action.ActionName, action.KeyToChoose)); possibleChoices += action.KeyToChoose; } char menuChoice = HelperMethods.GetChar(possibleChoices); HelperMethods.ClearLine(); switch (menuChoice) { case 'a': ActionsInfo(); break; case 's': StatsInfo(); break; case 'b': //return control upwards break; } }
public void MainMenu() { //Main Menu List <MenuAction> actions = _menuActionService.GetActionsForMenu("Main"); string possibleChoices = ""; foreach (var action in actions) { Console.Write(HelperMethods.Buttonize(action.ActionName, action.KeyToChoose)); possibleChoices += action.KeyToChoose; } char menuChoice = HelperMethods.GetChar(possibleChoices); HelperMethods.ClearLine(); switch (menuChoice) { case 'n': NewGame(); break; case 'i': _instructionsManager.InstructionsMenu(); MainMenu(); break; case 'x': break; } }
public Language ChooseLanguage() { //Language Choice Menu Console.Write(ChooseLanguageText.Text); List <MenuAction> actions = _menuActionService.GetActionsForMenu("Lang"); string possibleChoices = ""; foreach (var action in actions) { Console.Write(HelperMethods.Buttonize(action.ActionName, action.KeyToChoose)); possibleChoices += action.KeyToChoose; } char languageCode = HelperMethods.GetChar(possibleChoices); HelperMethods.ClearLine(); return(languageCode == 'p' ? Language.Polish : Language.English); }