public bool DeterminePurchase(int quality, int LikelihoodToBuy, int temperature, bool isRaining, bool isHumid) { bool buying; int humidity = 0; if (weather.IsHumid == true) { humidity = 15; } int raining = 0; if (weather.IsRaining == true) { raining = -20; } int number = Customer.GetLikelihoodToBuy(rng) + temperature + humidity + raining + Lemonade.quality; if (number > 100) { buying = true; } else { buying = false; } return(buying); }
public Day() { temperature = weather.DetermineTemperature(rng); ThirstLevel = Customer.GetLikelihoodToBuy(rng); numberOfCustomers = DetermineNumberOfCustomers(); }