Example #1
0
 public void MakeLemonade()
 {
     Inventory.PreparedLemonade += 10;
     Inventory.AlterInventory(-Recipe.LemonsNeeded, "lemons");
     Inventory.AlterInventory(-Recipe.IceCubesNeeded, "ice cubes");
     Inventory.AlterInventory(-Recipe.SugarUnitsNeeded, "sugar units");
 }
Example #2
0
 public void SellCup(decimal cupPrice)
 {
     Inventory.Money            += cupPrice;
     Inventory.PreparedLemonade -= 1;
     Inventory.AlterInventory(-1, "cups");
 }
Example #3
0
 public void ExecuteTransaction(Inventory inventory, decimal unitCost, int quantity, string option)
 {
     inventory.AlterInventory(quantity, option);
     inventory.AlterInventory(-(unitCost * quantity));
 }