Пример #1
0
        public string ChangeInput()
        {
            string input;


            UserInterface.RecipeMenuTitle();
            input = UserInterface.GetUserInput("To modify the recipe, type 'lemons', 'sugar', 'ice', 'price', or  'done'").ToLower();


            while (input != "price" && input != "lemons" && input != "sugar" && input != "ice" && input != "done")
            {
                input = UserInterface.RetryGetUserInput(input + " is not a valid respone, try again!").ToLower();
            }

            return(input);
        }
Пример #2
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;
                }
            }
        }