public static void GameMenuText(Player player, Day days)//Text for the game menu method in simulate program { Console.Clear(); Console.WriteLine("\nHello " + player.name + " and welcome to your game menu. Use the number\n" + "commands shown below or you can type the command to do any of the activities\n"); UserInterface.DisplayCurrentDay(days); UserInterface.DisplayCurrentInventoryAndMoney(player); Console.WriteLine("(1) Show Rules\n" + "(2) Create Recipe\n" + "(3) Go to Store\n" + "(4) Start your Day\n" + "(5) Skip Today\n" + "(6) Exit Game\n"); }
public void PlayGame() { int currentDay = 1; int menuOption; int amountOfDays; player.name = UserInterface.GetUsersName(); amountOfDays = UserInterface.GetNumberOfDays(); days = new List <Day>() { new Day(random) }; UserInterface.DisplayWelcome(player); player.recipe.CreateRecipe(); UserInterface.DisplayRecipe(player.recipe); for (int i = 0; i < amountOfDays; i++) { wouldYouLikeToContinue = "Y"; player.pitcher.pitchersOfLemonade /= 2; player.pitcher.cupsOfLemonade = player.pitcher.pitchersOfLemonade * player.pitcher.cupsPerPitcher; while (wouldYouLikeToContinue.ToLower() == "y") { if (player.wallet.Money > 0 || (player.inventory.lemons.Count > 0 && player.inventory.iceCubes.Count > 0 && player.inventory.sugarCubes.Count > 0 && player.inventory.cups.Count > 0)) //If player money > 0 OR the item in inventory > 0 { Console.Clear(); UserInterface.DisplayCurrentDay(currentDay); UserInterface.GetWeatherConditions(days[currentDay - 1]); UserInterface.DisplayWallet(player.wallet); UserInterface.DisplayCupsOfLemonade(player); menuOption = UserInterface.BuySellInvRecipeOption(); MenuSelection(menuOption, currentDay); } else if (player.wallet.Money <= 0 && (player.inventory.lemons.Count == 0 || player.inventory.iceCubes.Count == 0 || player.inventory.sugarCubes.Count == 0 || player.inventory.cups.Count == 0))// if player money <= 0 AND and a item in inventory = 0 { UserInterface.DisplayMoneyMessage(currentDay); return; } else if (player.wallet.Money <= 0 && (player.inventory.lemons.Count == 0 && player.inventory.iceCubes.Count == 0 && player.inventory.sugarCubes.Count == 0 && player.inventory.cups.Count == 0)) // If money <Ju= 0 AND all items in inventory = 0 { UserInterface.DisplayMoneyInvMessage(currentDay); } } days.Add(new Day(random)); currentDay++; } UserInterface.DisplayEndGameMessage(currentDay, player); }