Yet another Go implementation of Conway's Game of Life. Mostly an excuse to learn and practise the language but also to test out Termbox Go.
To start a randomly initialised game:
go run main.go
To load and run a particular pattern, specify a path to a valid Life 1.6 file:
go run main.go -file pattern.lif
The Game Of Life Wiki has a collection of 3000+ patterns in this format.
-alive string
Character to use to render alive cells. (default "●")
-file string
Path of pattern file to initialise game with. Takes precedence over --seed.
-fps int
Frames per second. (default 10)
-log string
Path of logfile to write debugging messages to. (default "/dev/null")
-seed int
Seed to be used in initialisation of random life.
- Spacebar to pause/unpause.
- Mouse click to toggle cell (if your terminal supports it).
- R to restart game.
- Q or CTRL-C to exit.
go test github.com/jfgreen/gameoflife-termbox/game
Can run a bit slow on on large terminals, your millage may vary.