Esempio n. 1
0
        public void StoreChoice(Player player, Inventory inventory)
        {
            switch (Console.ReadLine().ToLower())
            {
            case "lemons":
                selectItemAmount("lemon", new Lemon().GetLemonPrice(), player, inventory);
                inventory.AddToLemonInventory(amountOfItem);
                break;

            case "sugar":
                selectItemAmount("sugar", new Sugar().GetSugarPrice(), player, inventory);
                inventory.AddToSugarInventory(amountOfItem);
                break;

            case "ice":
                selectItemAmount("ice", new Ice().GetIcePrice(), player, inventory);
                inventory.AddToIceInventory(amountOfItem);
                break;

            case "go back":
                break;

            case "help":
                break;

            default:
                Console.WriteLine("Invalid selection. Please enter what you would like to buy.");
                StoreChoice(player, inventory);
                break;
            }
        }