Пример #1
0
        public void GoToMenu()
        {
            bool leaveMenu = false;

            while (leaveMenu == false)
            {
                UserInterface.PlayerInfoDisplay(player, days[currentDay - 1], days);
                UserInterface.DisplayMenu();
                string selection = UserInterface.GetUserInput("Where would you like to go?");
                while (selection.ToLower() != "start" && selection.ToLower() != "store" && selection.ToLower() != "recipe" && selection.ToLower() != "quit" && selection.ToLower() != "forecast")
                {
                    selection = UserInterface.RetryGetUserInput("not a valid selection!");
                }
                switch (selection)
                {
                case "store":
                    Console.Clear();
                    GoToStore();
                    break;

                case "recipe":
                    Console.Clear();
                    player.recipe.GoToRecipe(player, days[currentDay - 1], days);
                    break;

                case "start":
                    Console.Clear();
                    leaveMenu = true;
                    break;

                case "quit":
                    Console.Clear();
                    leaveMenu = true;
                    quitGame  = true;
                    break;

                case "forecast":

                    UserInterface.PlayerInfoDisplay(player, days[currentDay - 1], days);
                    UserInterface.SevenDayForecast(days, (currentDay - 1));

                    break;
                }
            }
        }