static public int RunChoice() { var choice = Console.ReadLine(); Console.Clear(); switch (choice) { case "1": { CreateNewLeague(); break; } case "2": { if (!CheckPlayerNumber()) { break; } ChooseWinners(); break; } case "3": { _scoreboard.Print(); break; } case "4": { Environment.Exit(0); break; } default: { Console.Clear(); Console.WriteLine("Please, press the appropriate button according to the menu!"); PrintMenu(); return(0); } } return(1); }
public static int RunChoice() { var choice = ConsoleWorker.MenuChoice(); switch (choice) { case "1": { CreateNewLeague(); break; } case "2": { if (!CheckPlayerNumber()) { break; } ChooseWinners(); break; } case "3": { _scoreboard.Print(); break; } case "4": { Environment.Exit(0); break; } default: { ConsoleWorker.IncorrectMenuChoice(); ConsoleWorker.Menu(); return(0); } } return(1); }