Exemple #1
0
        //public void FillPitcher()
        //{
        //    for (int i = 0; i < 10; i++)
        //    {
        //        glassesInPitcher.Add(glass);
        //    }
        //}

        public void RemoveGlassOfLemonadeFromPitcher(Inventory inventory)
        {
            if (glassesInPitcher.Count > 0)
            {
                glassesInPitcher.Remove(glass);
                inventory.SubtractCupSaleFromInventory();
            }
            else if (glassesInPitcher.Count == 0)
            {
                inventory.CheckRecipeIngredientsInventory(recipe);
            }
            else
            {
                inventory.CheckRecipeIngredientsInventory(recipe);
                RefillPitcher();
                // subtract recipe from inventory!!!!!!!!!!!!!!!!!!!
                inventory.SubtractPitcherIngredients(recipe);
                glassesInPitcher.Remove(glass);
                inventory.SubtractCupSaleFromInventory();
            }
        }