Question write code the Game of life game Each cell of the two dimensional array is in one of two states: alive or dead. are the cells that are horizontally, vertically, or diagonally adjacent. At each step in time a cell can change state from living to dead, or from dead to living or remain in its state based on the state of its neighbors. The transition to a new state is determined by the following rules1. Any live cell with fewer than two live neighbours dies, as if caused by under-population. 2. Any live cell with two or three live neighbours lives on to the next generation. 3. Any live cell with more than three live neighbours dies, as if by overcrowd4.Any dead cell with exactly three live neighbours becomes a live cell, as if by reproductionYour program should simulate the game on a 15x15 array. The program should first prompt the user to enter the initiallive cells by entering their rows and columns. Then it should display the grid and prompt the user to simulate the next generation. If the user inters yes, the program should compute and display the next generation until the user inters no

D9MT5I The Asker · Computer Science
write code  the Game of life game  Each cell of the two dimensional array is in one of two states: alive or dead. 
are the cells that are horizontally, vertically, or diagonally adjacent. At each step in time a cell can change state from 
living to dead, or from dead to living or remain in its state based on the state of its neighbors. The transition to a new state 
is determined by the following rules
1. Any live cell with fewer than two live neighbours dies, as if caused by under-population. 
2. Any live cell with two or three live neighbours lives on to the next generation. 
3. Any live cell with more than three live neighbours dies, as if by overcrowd
4.Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction
Your program should simulate the game on a 15x15 array. The program should first prompt the user to enter the initial
live cells by entering their rows and columns. Then it should display the grid and prompt the user to simulate the next 
generation. If the user inters yes, the program should compute and display the next generation until the user inters no
Transcribed Image Text: write code the Game of life game Each cell of the two dimensional array is in one of two states: alive or dead. are the cells that are horizontally, vertically, or diagonally adjacent. At each step in time a cell can change state from living to dead, or from dead to living or remain in its state based on the state of its neighbors. The transition to a new state is determined by the following rules 1. Any live cell with fewer than two live neighbours dies, as if caused by under-population. 2. Any live cell with two or three live neighbours lives on to the next generation. 3. Any live cell with more than three live neighbours dies, as if by overcrowd 4.Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction Your program should simulate the game on a 15x15 array. The program should first prompt the user to enter the initial live cells by entering their rows and columns. Then it should display the grid and prompt the user to simulate the next generation. If the user inters yes, the program should compute and display the next generation until the user inters no
More
Transcribed Image Text: write code the Game of life game Each cell of the two dimensional array is in one of two states: alive or dead. are the cells that are horizontally, vertically, or diagonally adjacent. At each step in time a cell can change state from living to dead, or from dead to living or remain in its state based on the state of its neighbors. The transition to a new state is determined by the following rules 1. Any live cell with fewer than two live neighbours dies, as if caused by under-population. 2. Any live cell with two or three live neighbours lives on to the next generation. 3. Any live cell with more than three live neighbours dies, as if by overcrowd 4.Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction Your program should simulate the game on a 15x15 array. The program should first prompt the user to enter the initial live cells by entering their rows and columns. Then it should display the grid and prompt the user to simulate the next generation. If the user inters yes, the program should compute and display the next generation until the user inters no