Exemplo n.º 1
0
        public void ChoosingCups(Player player, Inventory inventory, Wallet wallet)
        {
            Console.WriteLine("Type in the number of cups you want to buy");
            option = Console.ReadLine();
            switch (option)
            {
            case "25":
                Console.WriteLine("You bought 25 cups.");
                player.numberOfItemsBought = 25;
                cost = priceOf25Cups;
                wallet.ValidatingFunds(player, cost);
                inventory.AddingCups(player);
                buyingMore(player, inventory, wallet);
                break;

            case "50":
                Console.WriteLine("You bought 50 cups.");
                player.numberOfItemsBought = 50;
                cost = priceOf50Cups;
                wallet.ValidatingFunds(player, cost);
                inventory.AddingCups(player);
                buyingMore(player, inventory, wallet);
                break;

            case "100":
                Console.WriteLine("You bought 100 cups.");
                player.numberOfItemsBought = 100;
                cost = priceOf100Cups;
                wallet.ValidatingFunds(player, cost);
                inventory.AddingCups(player);
                buyingMore(player, inventory, wallet);
                break;

            default:
                Console.WriteLine("You typed in something wrong.");
                ChoosingCups(player, inventory, wallet);
                break;
            }
        }