Esempio n. 1
0
        public void GoToTheStore(Player player, Day day, List <Day> days)
        {
            do
            {
                UserInterface.PlayerInfoDisplay(player, day, days);

                UserInterface.DisplayStoreMenu();
                MenuSelection(player, day, days);
            }while (leaveStore == false);
        }
Esempio n. 2
0
        public void GoToRecipe(Player player, Day day, List <Day> days)
        {
            leaveRecipe = false;

            while (leaveRecipe != true)
            {
                Console.Clear();

                UserInterface.PlayerInfoDisplay(player, day, days);

                ChangeRecipeSwitch(ChangeInput());
            }
        }
Esempio n. 3
0
        public void PurchaseItems(string item, int quant, double price, Player player, Day day, List <Day> days)
        {
            bool didBuy = player.wallet.CheckWallet(price);

            if (didBuy == true)
            {
                UserInterface.ConfirmPurchase(item, quant, price, player);
                player.inventory.AddItemsToInventory(quant, item);
                UserInterface.PlayerInfoDisplay(player, day, days);
                GoToTheStore(player, day, days);
            }
            else
            {
                UserInterface.NotEnoughMoney();
            }
        }
Esempio n. 4
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;
                }
            }
        }