public void QuantityMenu(string item, int quant1, int quant2, int quant3, double price1, double price2, double price3, Player player, Day day, List <Day> days) { string choice; UserInterface.DisplayStoreQuantities(item, quant1, quant2, quant3, price1, price2, price3); choice = Console.ReadLine(); while (choice != "1" && choice != "2" && choice != "3" && choice != "back") { choice = UserInterface.RetryGetUserInput("not a valid entry, please type '1','2','3', or 'back'"); } switch (choice) { case "1": PurchaseItems(item, quant1, price1, player, day, days); break; case "2": PurchaseItems(item, quant2, price2, player, day, days); break; case "3": PurchaseItems(item, quant3, price3, player, day, days); break; case "back": GoToTheStore(player, day, days); break; } }
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(); } }
public void NewDay(int dayNum) { Day day = new Day(dayNum); days.Add(day); }