🔒 Closed Pahelp poGame of Life Project

Status
Not open for further replies.

p_psnow

Leecher
Hello po, I need your insights about this kind of project in C program. Hindi po ako ganun ka ma alam sa coding.

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 Game of Life using grid size of 20×20.
Dead cells must be represented as dots (·) while live cells as lowercase Os (o).

• 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.
• 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).
  • Once the choice has been made, your program must automatically spawn the succeeding generations.
  • Use the sleep() and system() commands.
 
Status
Not open for further replies.

About this Thread

  • 0
    Replies
  • 238
    Views
  • 1
    Participants
Last reply from:
p_psnow

Trending Topics

Online now

Members online
636
Guests online
916
Total visitors
1,552

Forum statistics

Threads
2,277,904
Posts
28,979,570
Members
1,229,144
Latest member
Karisma18
Back
Top