Beispiel #1
0
        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;
            }
        }