Answer to Question #43460 in C++ for john

Question #43460
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
Expert's answer

Not answered

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

New on Blog