void CreateStore() { GwAPI.GetADaysWeather(currentDay); // newCal.GetADaysWeather(currentDay); store.CreateInventory(); store.CreateSetNumCups(currentDay); store.CupContains(); store.Profits(); Console.WriteLine("Press ant Key to cotinue.."); Console.ReadLine(); }
public void CreateSetNumCups(int day) { SetCup(new List <Cups>()); numCupsToMake = 0; currentDay = day; Console.WriteLine("How Many Cups would you like to make?"); Console.WriteLine("Currently have Ice:" + CurrentItems.Ice1 + "Currently have Sugar: " + CurrentItems.Sugar1 + "Currently have Lemons: " + CurrentItems.Lemons1); int.TryParse(Console.ReadLine(), out int numCups); Console.WriteLine("how many cups do you want to make the same?"); int.TryParse(Console.ReadLine(), out int setOfCups); if (setOfCups >= 2 && setOfCups < numCups) { int ice = AskForIce(CurrentItems, setOfCups); int lemons = AskForLemons(CurrentItems, setOfCups); int sugar = AskForSugar(CurrentItems, setOfCups); for (int i = 0; i < setOfCups; i++) { prepedCups.Add(new Cups()); prepedCups[i].CreateCup(ice, lemons, sugar, IsFull()); } numCupsToMake = setOfCups; } while (numCupsToMake < numCups) { setOfCups = 0; Console.Clear(); GwAPI.GetADaysWeather(currentDay); //ShowCurrentWeather(weather); prepedCups.Add(new Cups()); Console.WriteLine("Cup: " + numCupsToMake); prepedCups[numCupsToMake].CreateCup(AskForIce(CurrentItems, setOfCups), AskForSugar(CurrentItems, setOfCups), AskForLemons(CurrentItems, setOfCups), IsFull()); numCupsToMake++; GwAPI.GetADaysWeather(currentDay); //ShowCurrentWeather(weather); } if (setOfCups > numCups) { Console.WriteLine("Your set is higher than the numer of cups you can make lets try again"); CreateSetNumCups(day); } SetPriceOfEachCup(GwAPI.weeksWeathers[currentDay].ChangePrice); }
public void StartGame() { // Geolocation.GetGeoLocation(); Console.WriteLine("How Many Days would you like to play"); int.TryParse(Console.ReadLine(), out int daysTPlay); SetUpWeather(daysTPlay); Console.WriteLine("Do you wish to see the Weeks Weather?"); if (Console.ReadLine().ToLower() == "yes") { ShowWeeksWeather(GwAPI.weeksWeathers); Console.WriteLine("Press ant Key to cotinue.."); Console.ReadKey(); } while (currentDay < daysTPlay) { CreateStore(); CreateCustomers(currentDay); foreach (var item in PotinalCustomers) { customer = new CustomerInteraction(item, store); GwAPI.GetADaysWeather(currentDay); //newCal.GetADaysWeather(currentDay); customer.IsPlayerThirsty(); Console.WriteLine("Press ant Key to cotinue.."); Console.ReadLine(); if (store.prepedCups.Count == 0) { break; } } GwAPI.GetADaysWeather(currentDay); //newCal.GetADaysWeather(currentDay); store.CalculateDaysPay(); Console.WriteLine("Press Any Key to Start the next day.."); Console.ReadLine(); currentDay++; store.DecreaseLife(); } }
void SetUpWeather(int daysToPlay) { GwAPI.GetWeather(daysToPlay, random); //newCal.CreateWeather(daysToPlay,random); }