public int AddFruit(Fruit fruit) { var random = new Random(); var rand = random.Next(1, 100); if (rand < 70 && !fruit.IsRotten) { Bowl.Fruits.Add(fruit); _logger.Log($"{fruit.Name} added to the bowl"); } else { _logger.Log($"{fruit.Name} not added to the bowl because it was rotten"); } return(Bowl.FruitAmount()); }
public Juicer(float maximumWeight) { Bowl = new Bowl(maximumWeight); Press = new Press(); }