A C Implementation of John Conway's famous Game of Life cellular automata
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
CMake
headers
src
.gitignore
LICENSE
README.md

README.md

John Conway's Game of Life

Description

Implementation of the John Conway's Game of Life based on terminal for Linux Operating Systems

Installation

git clone https://github.com/chibby0ne/gameoflife
cd Game_of_Life/CMake
cmake .
make

Usage

cd bin/
./gameoflife [OPTIONS] [arguments]...

Options

The available options are:

  • -w value Sets width of the terminal to be used the simulation (default: width of terminal window)
  • "-h` value Sets height of the terminal to be used the simulation (default: height of terminal window)
  • -r value Sets refresh time of the terminal in useconds (default: 0.2 sec) (time between generations of cells)
  • -p value Sets initial probability of living cell in percentage (default: 10)
  • -h Shows help

Implementation

  • C language
  • Random function seed uses system time
  • adjustable refresh rate
  • adjustable probability of live/dead cell for initial generation
  • adjustable width/height of universe (place where cells live/die)

Contributions

Contributions and pull requests are welcome. As long as you comply with these guideline:

  • Adhere as much as possible to the existing coding style, mainly, everything that could have curly braces has them
  • Good descriptive variable names

License

GPLv2