code / conway

Lines247 C195 make33 Markdown19
(26 lines)

Conway

This is a program for running Conway's Game of Life on the command line.

Preview

Building

make to build and make install to install.

Usage

Command line flags:

  • -S [0-8]* the rules for when an alive cell survives
  • -B [0-8]* the rules for when a new cell is born
  • -A <color> provide a color for alive cells (RGB hex, either 3 or 6 chars)
  • -D <color> provide a color for dead cells (RGB hex, either 3 or 6 chars)

Some interesting rulesets can be found in this list.

Actions:

  • Mouse: draw cells (by default: create new cells)
  • Space: toggle mouse mode between create/destroy
  • p: toggle play/pause
  • q or Escape: quit
  • c: clear the world
1 # Conway
2 This is a program for running [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life)
3 on the command line.
5 ![Preview](conway.gif)
7 ## Building
8 `make` to build and `make install` to install.
10 ## Usage
11 Command line flags:
13 * `-S [0-8]*` the rules for when an alive cell survives
14 * `-B [0-8]*` the rules for when a new cell is born
15 * `-A <color>` provide a color for alive cells (RGB hex, either 3 or 6 chars)
16 * `-D <color>` provide a color for dead cells (RGB hex, either 3 or 6 chars)
18 Some interesting rulesets can be found in [this list](http://psoup.math.wisc.edu/mcell/rullex_life.html).
20 Actions:
22 * Mouse: draw cells (by default: create new cells)
23 * Space: toggle mouse mode between create/destroy
24 * `p`: toggle play/pause
25 * `q` or Escape: quit
26 * `c`: clear the world