Skip to content

pjpollot/game_of_life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

John Conway's game of life

author: Pierre-Jean Pollot.

recording

Technologies

  • Language C11 with the graphic library SDL2.
  • gcc compiler.

Description

There are four types of cells:

  • Dead cells in black.
  • Living cells in white.
  • Newborn cells in green.
  • Dying cells in red.

Newborn cells and Dying cells will become respectively Living cells and Dead cells at the next step. For creating those two types of cells, Dead cells and Living cells are following the Game of life's rules that can be found here.

recording

Colorful mode: also prints Dying and Newborn cells.

Installation and run

In the document root, enter in the command line:

make

Then run the program by typing:

./golife [-i] number of iterations [-t] time in milliseconds [-p] initial probability that a cell is living [-c]

-c : enables the Colorful mode.

By default, it will iterate 300 times and change state each 70ms for an initial porosity of 0.15.

Tinkering your own game of life

For changing the display and the grid, you can change their parameters in the file src/properties.h.

About

My personal Conway's game of life using SDL2.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published