Ejemplo n.º 1
0
 public void DetermineIfCustomerBuys(Customer customer, Weather weather, Player player, Inventory inventory, Day day)
 {
     customer.GenerateCustomerPreferences();
     if (priceOfLemonade < customer.pricePreference && weather.actualTemperature > customer.temperaturePreference)
     {
         player.CashOnHand           += priceOfLemonade;
         cupsOfLemonadeLeftInPitcher -= 1;
         inventory.CupCount          -= 1;
         day.dailySales += priceOfLemonade;
         UserInterface.CustomerPurchased(customer, player);
     }
     else
     {
         UserInterface.CustomerDidNotPurchase(customer);
     }
 }