Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am writing c++ code for game of life for this code i need 10 generation. in second picture you can see what kind of

image text in transcribed

image text in transcribed

I am writing c++ code for game of life for this code i need 10 generation. in second picture you can see what kind of input and output I am looking .

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 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 empy 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions

Question

Evaluate and interpret your sources

Answered: 1 week ago

Question

2. How will the team select a leader?

Answered: 1 week ago