Ejemplo n.º 1
0
 public void AddCups(Player player)
 {
     for (int i = 0; i < moreCups; i++)
     {
         Cup cup = new Cup();
         player.inventory.cups.Add(cup);
     }
     player.wallet.Money -= pricePerCup * moreCups;
 }
Ejemplo n.º 2
0
 public void AddCupsSold(double totalCupsSold)
 {
     for (int i = 0; i < totalCupsSold; i++)
     {
         Cup cup = new Cup();
         if (player.inventory.lemons.Count > player.cupsSold.Count && player.inventory.sugarCubes.Count > player.cupsSold.Count && player.inventory.iceCubes.Count > player.cupsSold.Count && player.inventory.cups.Count > player.cupsSold.Count)
         {
             player.cupsSold.Add(cup);
             Sales(player);
         }
     }
 }
Ejemplo n.º 3
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);
            }
        }
Ejemplo n.º 4
0
 public void AddInventory()
 {
     for (int i = 0; i < 10; i++)
     {
         Lemon lemon = new Lemon();
         inventory.lemons.Add(lemon);
     }
     for (int i = 0; i < 10; i++)
     {
         SugarCube sugar = new SugarCube();
         inventory.sugarCubes.Add(sugar);
     }
     for (int i = 0; i < 10; i++)
     {
         IceCube ice = new IceCube();
         inventory.iceCubes.Add(ice);
     }
     for (int i = 0; i < 10; i++)
     {
         Cup cup = new Cup();
         inventory.cups.Add(cup);
     }
 }