public void CreateSweets(Sweets sweet) { if (Sugar >= sweet.Sugar) { Sweets.Add(sweet); Sugar -= sweet.Sugar; } }
public void Selling(Sweets sweet, int pieces) { for (int i = 0; i < pieces; i++) { Sweets.Remove(sweet); Money += sweet.Price; } }
public void Sell(Sweets sweet, int pieces) { if (sweet == CANDY) { if (InventoryCheck()["candies"] >= pieces) { Selling(sweet, pieces); } } else { if (InventoryCheck()["lollipops"] >= pieces) { Selling(sweet, pieces); } } }
public void CreateSweets(Sweets sweets) { CandyShopsStorage.Add(sweets); }