Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer in C++ not Java thank you!!! The Problem Your mission is to implement a version of the game of Life, originally conceived by

image text in transcribedimage text in transcribedimage text in transcribed

Please answer in C++ not Java thank you!!!

The Problem Your mission is to implement a version of the game of Life, originally conceived by the British mathematician J.H. Conway in 1970. The game is a simulation that models the life cycle of bacteria. Given an initial pattern, the game simulates the birth and death of future generations using simple rules. The game is played on a two-dimensional grid (think 2 Dimensional array). Each grid location is either empty or occupied by a single cell (X). A location's neighbors are any cells in the surrounding eight adjacent locations. In the following example, the shaded middle location has three "live" neighbors: Read further about this problem at https:llen. wikipedia.org/wikiConway%27s Game of Life The Rules The simulation starts with an initial pattern of cells (Remember a cell is an X (an active life)) on the grid and computes successive generations of cells according to the following rules: 1. A location that has zero or one neighbors will be empty in the next generation. If a cell was in that location, it dies of loneliness. 2. A location with two neighbors is stable-that is, if it is occupied by a cell, it is still occupied by a cell. If it was empty, it's still empty. 3. A location with three neighbors will contain a cell in the next generation. If it was unoccupied before, a new cell is born and placed in this location. If it currently contains a cell, the cell remains. Good times. 4. A location with four or more neighbors will be empty in the next generation. If there was a cell in that location, it dies of overcrowding. 5. The births and deaths that transform one generation to the next must all take effect simultaneously. Thus, when computing anew generation, new births and deaths in that generation don't impact other births and deaths in that generation. To keep the two generations separate, youwill need to work on two versions of the grid-one for the current

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

Step: 3

blur-text-image

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 Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions

Question

What is the environment we are trying to create?

Answered: 1 week ago

Question

How would we like to see ourselves?

Answered: 1 week ago