public void AddIngredients(IIngredients ingredients) { foreach (var ingredient in ingredients.GetIngredients()) { this.AddIngredient(ingredient); } }
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); }