Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970. The universe

The Game of Life, also known simply as Life, is a cellular automaton devised by the

British mathematician John Horton Conway in 1970.

The universe of the Game of Life is an infinite grid of cells, each of which is in one of

two possible states, alive or dead. Every cell interacts with its eight neighbors, which are

the cells that are horizontally, vertically or diagonally adjacent. At each step in time, the

following transition occur:

Any live cell with fewer than two live neighbors dies, as if caused by under-population/loneliness

Any live cell with two or three live neighbors lives on to the next generation

Any live cell with four or more live neighbors dies, as if by overcrowding

Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction

For this project, create a C program that simulates the Game of Life using grid size of 2020.

Dead cells must be represented as dots () while live cells as lowercase Os (o).

with these specifications:

Use the sleep() and system() commands.

As input, the user must choose an initial configuration from the following choices:

1. Glider

2. Small Exploder

3. Exploder

4. 10-cell row

5. Lightweight Starship

6. Tumbler

The initial pattern constitutes the seed of the system. The first generation is created

by applying the above rules simultaneously to every cell in the seed births and

deaths occur simultaneously.

Once the choice has been made, your program must automatically spawn the succeeding generations.

The maximum number of generations for this project would be 100.

Once your program has been generating the same population for 10 consecutive times, terminate the generation.

If the maximum number of generations has been reached or if it has been terminated

due to condition stated above, ask if the user wants to choose another configuration

or not (1 for yes and 2 for no).

Include error handlings in your code (program must only accept numbers, not letters

or symbols).

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

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions

Question

Complexity of linear search is O ( n ) . Your answer: True False

Answered: 1 week ago