public void DecideRecipeForTheDay(Player player) { bool playerSettingRecipe = true; UserInterface.PromptUserForDesiredRecipe(); do { UserInterface.DisplayCurrentInventory(player.inventory.lemons.Count, player.inventory.sugarCubes.Count, player.inventory.iceCubes.Count, player.inventory.cups.Count); UserInterface.DisplayCurrentRecipe(player.recipe.amountOfLemons, player.recipe.amountOfSugarCubes, player.recipe.amountOfIceCubes, player.recipe.pricePerCup); UserInterface.DisplayRecipeOptions(); player.SetLemondadeRecipe(UserInterface.TakePlayerInput().ToLower()); UserInterface.DoYouWantToContinueToSetRecipe(); string input = UserInterface.TakePlayerInput().ToLower(); if (input == "no") { playerSettingRecipe = false; } else if (input == "yes") { Console.Clear(); continue; } else { UserInterface.DisplayInvalidSelectionMessage(); } } while (playerSettingRecipe); }
public void PlayerIsInTheStore(Player player) { UserInterface.StorePurchaseMessage(); bool playerWantsToBuy = true; do { UserInterface.DisplayMoneyHeld(player.wallet.Money); UserInterface.DisplayStorePrices(pricePerLemon, pricePerSugarCube, pricePerIceCube, pricePerCup); UserInterface.DisplayCurrentInventory(player.inventory.lemons.Count, player.inventory.sugarCubes.Count, player.inventory.iceCubes.Count, player.inventory.cups.Count); UserInterface.DisplayItemList(); WhatPlayerWantsToBuy(player); UserInterface.DoYouWantToContinueToBuy(); string playerBuyingItems = UserInterface.TakePlayerInput().ToLower(); if (playerBuyingItems == "no") { playerWantsToBuy = false; } else if (playerBuyingItems == "yes") { continue; } else { UserInterface.DisplayInvalidSelectionMessage(); } } while (playerWantsToBuy); }