public Pitcher MakeNewPitcher() { pitcher = new Pitcher(); inventory.RemoveCupsFromInventory(pitcher.cupsLeftInPitcher); inventory.RemoveLemonsFromInventory(recipe.amountOfLemons); inventory.RemoveSugarCubesFromInventory(recipe.amountOfSugarCubes); inventory.RemoveIceCubesFromInventory(recipe.amountOfIceCubes); return(pitcher); }
public void MakePitcher() { if (inventory.lemons.Count >= recipe.amountOfLemons && inventory.sugarCubes.Count >= recipe.amountOfSugarCubes && inventory.cups.Count > 0) { pitcher = new Pitcher(); inventory.RemoveLemonsFromInventory(recipe.amountOfLemons); inventory.RemoveSugarCubesFromInventory(recipe.amountOfSugarCubes); } }
// member methods public bool MakePitcherOfLemonade() { if (inventory.lemons.Count >= recipe.amountOfLemons && inventory.sugarCubes.Count >= recipe.amountOfSugarCubes) { pitcher.RefillPitcher(); inventory.RemoveLemonsFromInventory(recipe.amountOfLemons); inventory.RemoveSugarCubesFromInventory(recipe.amountOfSugarCubes); return(true); } return(false); }