private void SellLemonadeCups(Day currentDay, string lemonadeTaste, Random randomNumber, Human gamePlayer, int priceModifier) { int totalLemonadeCups; foreach (Customer potientialCustomer in currentDay.lemonadeCustomers) { totalLemonadeCups = gamePlayer.gameInventory.gameLemonadeCups.Count(); Console.WriteLine("\nA new customer is approaching"); Console.Write("*"); Thread.Sleep(100); Console.Write("*"); Thread.Sleep(100); Console.Write("*"); Thread.Sleep(100); Console.Write("*"); Thread.Sleep(100); if (potientialCustomer.TastePreference == lemonadeTaste && currentDay.WeatherCondition.Temperature > 80 && totalLemonadeCups != 0) { decimal chanceTobuy = (1 * priceModifier); if (chanceTobuy == 1) { currentDay.purchasingCustomers.Add(potientialCustomer); gamePlayer.gameInventory.gameLemonadeCups.RemoveAt(0); Console.WriteLine("The customer purchased some lemonade!"); } } else if (potientialCustomer.TastePreference == lemonadeTaste && currentDay.WeatherCondition.Temperature > 60 && totalLemonadeCups != 0) { decimal chanceTobuy = randomNumber.Next(1, (2 * priceModifier)); if (chanceTobuy == 1) { currentDay.purchasingCustomers.Add(potientialCustomer); gamePlayer.gameInventory.gameLemonadeCups.RemoveAt(0); Console.WriteLine("The customer purchased some lemonade!"); } } else if (potientialCustomer.TastePreference == lemonadeTaste && currentDay.WeatherCondition.Temperature > 80 && currentDay.WeatherCondition.Condition == "raining" && totalLemonadeCups != 0) { decimal chanceTobuy = randomNumber.Next(1, (3 * priceModifier)); if (chanceTobuy == 1) { currentDay.purchasingCustomers.Add(potientialCustomer); gamePlayer.gameInventory.gameLemonadeCups.RemoveAt(0); Console.WriteLine("The customer purchased some lemonade!"); } } if (potientialCustomer.TastePreference != lemonadeTaste && currentDay.WeatherCondition.Temperature > 80 && totalLemonadeCups != 0) { decimal chanceTobuy = randomNumber.Next(1, (5 * priceModifier)); if (chanceTobuy == 1) { currentDay.purchasingCustomers.Add(potientialCustomer); gamePlayer.gameInventory.gameLemonadeCups.RemoveAt(0); Console.WriteLine("The customer purchased some lemonade!"); } } else if (potientialCustomer.TastePreference != lemonadeTaste && currentDay.WeatherCondition.Temperature > 60 && totalLemonadeCups != 0) { decimal chanceTobuy = randomNumber.Next(1, (7 * priceModifier)); if (chanceTobuy == 1) { currentDay.purchasingCustomers.Add(potientialCustomer); gamePlayer.gameInventory.gameLemonadeCups.RemoveAt(0); Console.WriteLine("The customer purchased some lemonade!"); } } else if (totalLemonadeCups == 0) { Console.WriteLine("You are out of Lemonade for the day!"); break; } } }
private Day SelectCurrentDay() { Day currentGameDay = selectedGameDays[0]; return(currentGameDay); }