private void PauseGame(bool isNotPaused) { isNotPaused = false; isNotPaused = ScreenController.PauseGame(this); int width = Terrarium.Width + 1; int height = Terrarium.Height + 5; Console.SetWindowSize(width, height); Console.SetBufferSize(width, height); Console.Clear(); Terrarium.CreateEmptyTerrarium(); Terrarium.RenderAnimals(); Terrarium.RenderPlants(); }
private void FirstDay() { // Clear the console Console.Clear(); // Print the terrarium to the console using colors Terrarium.CreateEmptyTerrarium(); if (!loadedGame) { // Add Organisms to List for (int i = 0; i < TerrariumSettings.Carnivores; i++) { addIOrganism(new Carnivore()); } for (int i = 0; i < TerrariumSettings.Herbivores; i++) { addIOrganism(new Herbivore()); } for (int i = 0; i < TerrariumSettings.Plants; i++) { addIOrganism(new Plant()); } for (int i = 0; i < TerrariumSettings.Humans; i++) { addIOrganism(new Human()); } } // Render the animals Terrarium.RenderAnimals(); Terrarium.RenderPlants(); // Update timestep according to n organisms (n / animals) // This way turns always last n ms TimeController.SetStepTimeout(); // Wait for input Console.ForegroundColor = ConsoleColor.White; Console.SetCursorPosition(0, Terrarium.Height + 3); Console.Write("Press 'Enter' to start"); string input = Console.ReadLine(); Console.SetCursorPosition(0, Terrarium.Height + 3); Console.WriteLine(" "); }