예제 #1
0
 public void AddIceCube(decimal buyIceCube)
 {
     for (int i = 0; i < buyIceCube; i++)
     {
         IceCube iceCube = new IceCube();
         iceCubes.Add(iceCube);
     }
 }
예제 #2
0
        public void AddItemsToInventory(int quantity, string item)
        {
            switch (item)
            {
            case "cups":
                for (int i = 0; i < quantity; i++)
                {
                    Cup cup = new Cup();
                    cups.Add(cup);
                }
                break;

            case "lemons":
                for (int i = 0; i < quantity; i++)
                {
                    Lemon lemon = new Lemon();
                    lemons.Add(lemon);
                }
                break;

            case "sugar":
                for (int i = 0; i < quantity; i++)
                {
                    SugarCup sug = new SugarCup();
                    sugarCups.Add(sug);
                }
                break;

            case "ice":
                for (int i = 0; i < quantity; i++)
                {
                    IceCube ice = new IceCube();
                    iceCubes.Add(ice);
                }
                break;
            }
        }