public void RunDay(Player player, Store store) { //show actual temperature and condiiton weather.ActualTemperature(); //start of Day moneyAtStartOfDay = Math.Round(player.bank * 100) / 100; Console.WriteLine($"{player.name} Your money to start the day is ${moneyAtStartOfDay}\n"); User_Interface.DisplayInventory(player.inventory); //player goes to store after that set recipe store.StoreMenu(player); player.Recipe(); Console.WriteLine("Update of Inventory\n"); //display inventory again to make sure recipe was subtracted from inventory User_Interface.DisplayInventory(player.inventory); //recipe cup price added to player.bank everytime a customer buys a cup CustomersList(player.pricePerCup); for (int i = 0; i < customers.Count; i++) { if (customers[i].chooseToBuy == true) { player.bank += player.pricePerCup; } } //show end of the day progress for profit or loss moneyAtEndOfDay = Math.Round(player.bank * 100) / 100; Console.WriteLine($"{player.name} Your money to end the day is ${moneyAtEndOfDay}\n"); }
//methods to do public void StoreMenu(Player player) { bool isValid = false; while (!isValid) { Console.WriteLine("Please select what you would want to purchase.\nPlease input lemon, sugar, icecube, cup, exit (to exit menu), or inventory to go back to look at inventory"); string storeItem = Console.ReadLine().ToLower(); switch (storeItem) { case "lemon": PurchaseLemon(player); Console.WriteLine($"Your money left after purchase = ${player.bank}"); break; case "sugar": PurchaseSugar(player); Console.WriteLine($"Your money left after purchase = ${player.bank}"); break; case "icecube": PurchaseIce(player); Console.WriteLine($"Your money left after purchase = ${player.bank}"); break; case "cup": PurchaseCup(player); Console.WriteLine($"Your money left after purchase = ${player.bank}"); break; case "inventory": User_Interface.DisplayInventory(player.inventory); break; case "exit": isValid = true; break; default: Console.WriteLine("You did not put in a valid input. Please try again!!"); break; } } }