private void SelectGameOption() { string[] descriptionLines = { "Hello " + coach.name, "Select your game option:" }; string[] options = { "[1] World Cup" }; int selectedOption = ConsoleHandler.OptionChoice(false, descriptionLines, options); switch (selectedOption) { case 0: StartNewWorldCup(); break; } ; }
public void StartGame() { StartNewWorldCup(); string option = ConsoleHandler.Welcome(); switch (option) { case "[1] New Game": CreateNewCoach(); break; case "[2] About": break; } }
public void StartNewWorldCup(CoachModel coach) { string[] description = { "Welcome to World Cup " + "[COACH NAME]", "Please select your team:" }; List <string> teamListToSelection = new List <string> { }; foreach (TeamModel team in teams) { teamListToSelection.Add(team.name); } var optionSelected = ConsoleHandler.SelectWorldCupTeam(description, teamListToSelection.ToArray()); Console.Clear(); Console.Write("Selected Team2: " + teamListToSelection[optionSelected]); Console.ReadKey(); }
// private methods private static void DefaultTitile() => ConsoleHandler.TextArt(defaultTitle);
// public methods public void CreateNewCoach() { coach = ConsoleHandler.CreateCoach(); SelectGameOption(); }