Question: I am using C++ and I need the code for CONWAY'S GAME OF LIFE using 2 dimensional arrays. And in this code we are using

 I am using C++ and I need the code for CONWAY'S

GAME OF LIFE using 2 dimensional arrays. And in this code we

I am using C++ and I need the code for CONWAY'S GAME OF LIFE using 2 dimensional arrays. And in this code we are using if else and statements to tell if the creature is alive or dead. In the second picture you can see what kind of input and output I am looking for.

The Game of Life The life game consists of a board with size of NxN cells and cells are occupied by creatures. Each cell can have at most one creature. The surrounding cells are called the neighbors of this cell Each game state is called "generation". The game progresses from one generation to the next according to the following rules 1. A creature that has more than 3 neighbors dies of crowding. Its cell will be empty in the next generation. 2. A creature that has less than 2 neighbors dies of loneliness. 3. If an empty cell that has exactly 3 neighbors, a new creature is born in that cell. Write a program that consists of a 10 x 10 cell grid board. The program will prompt for the initial state of the world and the number of generations to be played. After each generation the program will update the state of the board and will display the updated board. The program can stop if it has reached the number of required generations or if no further changes occur (i.e., no more creatures alive or it has reached a steady or repeating pattern)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!