public void CheckCostLimit(IArmyCostLimitService service) { foreach (var weapon in weapons) { weapon.CheckCostLimit(service); } foreach (var armor in armors) { armor.CheckCostLimit(service); } var costRelatedOnQuantity = quantity.Multiply(cost); service.AccumulateCost(costRelatedOnQuantity); }
public void CheckCostLimit(IArmyCostLimitService service) { service.AccumulateCost(cost); }