Skip to content

mcmangini/cgol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cgol

Conway's Game of Life, in your terminal, written in C with ncurses.

Screenshot of the Gosper glider gun running in cgol

Installation

git clone https://github.com/mcmangini/cgol.git
cd cgol
make
sudo make install

# To uninstall, run
sudo make uninstall

Usage

cgol [OPTION]

Options

  • -h, --help
    • Display usage message
  • -p, --pattern <pattern>
    • Load a predefined grid
  • -w, --wrap
    • Wrap the grid at the edges

Patterns

Patterns are predefined grids represented by .txt files. The first line of the file specifies the dimensions of the grid in the format <rows>x<columns>. The following lines represent the cells of the grid, with a 0 representing a dead cell and a 1 representing a living cell. Refer to the included pattern files for examples of proper formatting.

Pattern files are stored at /usr/local/share/cgol/patterns by default.

Included patterns are:

  • beacon
  • blinker
  • glider
  • gosper_glider_gun
  • hwss
  • lwss
  • mwss
  • pentadeca
  • pulsar
  • r-pentomino
  • toad

Application Controls

  • q - Quit
  • p - Pause/Resume
  • r - Restart
  • 1 - Slow speed
  • 2 - Medium speed
  • 3 - Fast speed

About

Conway's Game of Life, in your terminal, written in C with ncurses

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages