static void Main(string[] args) { Console.CursorVisible = false; Console.SetWindowSize(76, 28); Console.SetBufferSize(76, 28); Console.ForegroundColor = ConsoleColor.DarkMagenta; Board gameBoard = new Board(25, 75); // Creates a gameboard with the dimensions x = 25 y = 75. Cells Game = new Cells(); // Makes an instances of the cell class which manipulates the individual cells on the gameboard. Game.addRandomValuesTo(gameBoard); // Adds random live and dead cells to the gameBoard Menue.Intro(); // Prints a title screen. gameBoard.printGameBoard(gameBoard.GameBoard); // Prints the gameBoard in the console. Console.WriteLine("\r\nThis is the seed. Press any key to start game of life..."); Console.ReadKey(true); do { Console.Clear(); gameBoard.GameBoard = Game.ManipulateCells(gameBoard); // Manipulates the values according to the rules of game of life. gameBoard.printGameBoard(gameBoard.GameBoard); // Prints the gameboard in the console. Console.ReadLine(); } while (true); }
} // Not implemented. public void ExistingBoards(List <int[, ]> boards) { var mybord = new Board(); Console.WriteLine("Press Enter to flip through the avialable boards"); for (int i = 0; i < boards.Count; i++) { Console.WriteLine($"--------------------Board number {i} --------------------"); mybord.printGameBoard(boards[i]); Console.ReadLine(); } Console.WriteLine("To choose a board, please enter the number of the board you wish to select"); int selection = 0; while (!int.TryParse(Console.ReadLine(), out selection)) { Console.WriteLine("You did not enter a correct number, please try again"); } } // Not implemented.