Beispiel #1
0
 public void Weather(Random rand)
 {
     weather.GetTemperature(rand);
     weather.GetOvercast(rand);
     weather.DisplayTodaysWeather();
 }
Beispiel #2
0
        public void PlayerMenu()
        {
            while (mainMenu)
            {
                DisplayGameTitle();
                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("\n*************** DAY {0} ***************", currentDay);
                Console.ResetColor();
                weather.DisplayTodaysWeather(weatherForecast);
                Console.WriteLine("\n{0} what would you like to do?", player.Name);
                Console.ForegroundColor = ConsoleColor.DarkYellow;
                Console.WriteLine("[1] Start Day [2] Inventory [3] Store [4] Cash Balance \n[5] Recipe    [6] Set Price [7] Quit ");
                string choice = Console.ReadLine().ToLower();
                Console.ResetColor();
                switch (choice)
                {
                case "1":
                    Console.Clear();
                    day.StartDay(inventory, player, this, weatherForecast[0]);
                    day.EndDay(this, player, inventory);

                    Console.ReadKey();
                    break;

                case "2":
                    inventory.DisplayInventory();
                    Console.ReadKey();
                    break;

                case "3":
                    store.Purchase(inventory.Storage, player, inventory);
                    Console.ReadKey();
                    break;

                case "4":
                    player.DisplayCash();
                    Console.ReadKey();
                    break;

                case "5":
                    player.DisplayRecipe();
                    player.GetChangeRecipe();
                    Console.ReadKey();
                    break;

                case "6":
                    player.DisplayPricePerLemonadeCup();
                    Console.ReadKey();
                    break;

                case "7":
                    mainMenu = false;
                    Console.WriteLine("You Ended the Game. Goodbye!");
                    Console.ReadKey();
                    Environment.Exit(0);
                    break;

                default:
                    Console.WriteLine("Thats not a valid option, please choose between [1] - [7]");
                    Console.WriteLine("press enter to continue...");
                    Console.ReadLine();
                    mainMenu = true;
                    break;
                }
            }
        }