public void BuyLemonade(Recipe recipe, Wallet wallet, Inventory inventory) { if (recipe.CupsInPitcher > 0) { wallet.CashBalance += recipe.LemonadePrice; inventory.CupQuantity--; } else { recipe.MakePitcher(inventory); } }
public void GenerateDays(Weather weather, Inventory inventory, Recipe recipe, Day day, Wallet wallet, Customer customer, Player player) { for (int i = 0; i < day.NumberOfDays; i++) { weather.SetTemperature(); weather.SetConditions(); weather.DeclareWeather(); weather.SetTemperature(); weather.SetConditions(); weather.DeclareForecast(); inventory.PurchaseSupplies(wallet); inventory = recipe.MakePitcher(inventory); recipe.DeterminePriceOfLemonade(); GenerateCustomers(); customer.VisitStand(day, weather, recipe, wallet, inventory); inventory.DeclareCupsSold(); inventory.DeclareInventory(); player.DeclareCashBalance(wallet); } }