Exemple #1
0
        public void BuyCups(Player player)
        {
            Cup cup = new Cup();

            if (player.wallet.Money >= pricePerCup * bulkQty)
            {
                UserInterface.BuyItem(bulkQty, cup.name);
                player.wallet.Money -= bulkCupPrice;
                for (int i = 0; i < bulkQty; i++)
                {
                    player.inventory.cups.Add(cup);
                }
            }
            else
            {
                UserInterface.NotEnoughMoney(cup.name);
            }
        }
Exemple #2
0
        public void BuySugarCubes(Player player)
        {
            SugarCube sugarCube = new SugarCube();

            if (player.wallet.Money >= pricePerSugarCube * bulkQty)
            {
                UserInterface.BuyItem(bulkQty, sugarCube.name);
                player.wallet.Money -= bulkSugarPrice;
                for (int i = 0; i < bulkQty; i++)
                {
                    player.inventory.sugarCubes.Add(sugarCube);
                }
            }
            else
            {
                UserInterface.NotEnoughMoney(sugarCube.name);
            }
        }
Exemple #3
0
        public void BuyIceCubes(Player player)
        {
            IceCube iceCube = new IceCube();

            if (player.wallet.Money >= pricePerIceCube * bulkQty)
            {
                UserInterface.BuyItem(bulkQty, iceCube.name);
                player.wallet.Money -= bulkIcePrice;
                for (int i = 0; i < bulkQty; i++)
                {
                    player.inventory.iceCubes.Add(iceCube);
                }
            }
            else
            {
                UserInterface.NotEnoughMoney(iceCube.name);
            }
        }
Exemple #4
0
        //Member Methods (CAN DO)
        public void BuyLemons(Player player)
        {
            Lemon lemon = new Lemon();

            if (player.wallet.Money >= pricePerLemon * bulkQty)
            {
                UserInterface.BuyItem(bulkQty, lemon.name);
                player.wallet.Money -= bulkLemonPrice;
                for (int i = 0; i < bulkQty; i++)
                {
                    player.inventory.lemons.Add(lemon);
                }
            }
            else
            {
                UserInterface.NotEnoughMoney(lemon.name);
            }
        }