public void SellLemonade(Player player) { int count = 0; foreach (Customer customer in customers) { if (customer.WillingToPay && recipe.pitcher.cupsLeftInPitcher > 0) { recipe.pitcher.cupsLeftInPitcher--; player.wallet.Money += Convert.ToDouble(recipe.PricePerCup); count++; } else { recipe.CreatePitcher(player.inventory); } } Console.WriteLine("You sold " + count + " number of cups"); //Loop over customers ands sell lemonade to them based of the true or false they return. }
public Recipe SetRecipe() { recipe.SetRecipe(); recipe.CreatePitcher(inventory); return(recipe); }