Beispiel #1
0
        public void SetRecipe(Player player, Day newDay, Store newStore)
        {
            newDay.DisplayWeather();
            DisplayRecipe();
            Console.WriteLine("Here you can set the recipe for your lemonade, a base recipe would be 4 of each. You can stay with the basic recipe, however, try to set your recipe based on the weather and conditions. The more or less of an ingredient used can affect demand.\nYou can also change the price per cup but try to adjust it based on weather conditions.\n");
            Console.WriteLine($"You can choose which item you want to adjust by typing in the corresponding number...\n1: Lemons per Pitcher\n2: Sugar per Pitcher\n3: Ice per Cup\n4: Set the price per Cup\n5: Return to the Store.");
            int result = Convert.ToInt32(UserInterface.ChooseRecipeChoice());

            if (result == 1)
            {
                SetLemonsRecipe(player, newDay, newStore);
            }

            else if (result == 2)
            {
                SetSugarRecipe(player, newDay, newStore);
            }

            else if (result == 3)
            {
                SetIceRecipe(player, newDay, newStore);
            }

            else if (result == 4)
            {
                SetPrice(player, newDay, newStore);
            }

            else if (result == 5)
            {
                Console.Clear();
                newStore.PromptPlayerPurchase(player, newDay, newStore);
            }
        }
Beispiel #2
0
        public void PurchaseInventory(Player player, Day newDay, Store newStore)//possibly create a money class to round the totalMoney
        {
            newDay.DisplayWeather();
            if (player.totalMoney > 0)
            {
                DisplayInventory(player);
                Console.WriteLine($"You can choose which items you want to restock and/or set the recipe by typing in the corresponding number...\n1: Paper cups\n2: Lemons\n3: Cups of sugar\n4: Ice cubes\n5: Return to main menu\n");
                int result = Convert.ToInt32(UserInterface.ChooseRestockChoice());
                while (result != 5)
                {
                    if (result == 1)
                    {
                        PurchasePaperCups(player, newDay, newStore);
                    }

                    else if (result == 2)
                    {
                        PurchaseLemons(player, newDay, newStore);
                    }

                    else if (result == 3)
                    {
                        PurchaseSugarCups(player, newDay, newStore);
                    }

                    else if (result == 4)
                    {
                        PurchaseIceCubes(player, newDay, newStore);
                    }
                    newDay.DisplayWeather();
                    DisplayInventory(player);
                    Console.WriteLine($"You can choose which items you want to restock and/or set the recipe by typing in the corresponding number...\n1: Paper cups\n2: Lemons\n3: Cups of sugar\n4: Ice cubes\n5: Return to main menu\n");
                    result = Convert.ToInt32(UserInterface.ChooseRestockChoice());
                }
            }

            else
            {
                Console.WriteLine($"You don't have enough funds to purchase any items: ${player.totalMoney}.");
                Console.ReadLine();
            }
        }