Exemplo n.º 1
0
 public void AddIngredients(IIngredients ingredients)
 {
     foreach (var ingredient in ingredients.GetIngredients())
     {
         this.AddIngredient(ingredient);
     }
 }
Exemplo n.º 2
0
        public static int GetTotalCostOfIngredients(IIngredients ingredients)
        {
            var totalCost = 0;

            foreach (var ingredient in ingredients.GetIngredients())
            {
                if (ingredient.Item.IsCraftable)
                {
                    continue;
                }

                totalCost += GetCostOfIngredient(ingredient);
            }

            return(totalCost);
        }