Home

Awesome

conwaygo

Conway's Game of Life implementation

Usage

$ go build cmd/life/life.go
$ ./life -h
Usage of ./life:
  -debug
      Display in debug mode
  -delay float
      Seconds between updates (default 0.2)

When the binary in run, you will be presented with a blank screen.
Click on the terminal where you wish the seed live cells. You can do this at anytime, even after you have started the simulation.

Keybindings

KeyDescription
spaceStart and stop the simulation
Page UpIncrease the speed of the simulation
Page DownDecrease the spped of the simulation
ctrl+dEnable debug mode.
arrow keysMove the viewport

In debug mode instead of displaying live cells, each tile will show the number living cells surrounding it.

Example

Note This gif is a little out of date, now that the code is split up into a pkg and cmd directory, build the project by running go build cmd/life/life.go