Beispiel #1
0
        public int moneyInput = 0; // Buffer variabel used for keeping track of how many moneys, the user has put into the machine


        public VendingMachine()
        {
            for (int i = 0; i < 3; i++)
            {
                wheels[i, 0] = new VendingWheel(new Chips());
                wheels[i, 1] = new VendingWheel(new Soda());
                wheels[i, 2] = new VendingWheel(new Candy());
            }
        }
Beispiel #2
0
 /// <summary>
 /// Refills the products in the vending wheels
 /// </summary>
 /// <param name="wheelToFill"></param>
 public void FillProducts(VendingWheel wheelToFill)
 {
     for (int i = 0; i < 5; i++)
     {
         Product product = new Product(wheelToFill.Product.Name, wheelToFill.Product.Brand, wheelToFill.Product.Price);
         product = wheelToFill.Product;
         wheelToFill.products.Push(product);
     }
 }