https://github.com/reesporte/conway
conway's game of life
https://github.com/reesporte/conway
cli conways-game-of-life go
Last synced: 3 months ago
JSON representation
conway's game of life
- Host: GitHub
- URL: https://github.com/reesporte/conway
- Owner: reesporte
- License: mit
- Created: 2021-07-25T03:56:29.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-25T21:16:09.000Z (almost 4 years ago)
- Last Synced: 2025-01-16T16:25:34.406Z (5 months ago)
- Topics: cli, conways-game-of-life, go
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# conway's game of life
this is [conway's game of life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) but implemented using a [toroidal array](https://en.wikipedia.org/wiki/Torus) so it looks nicer in a terminal display.
## usage
```
$ go build .
$ ./life
```
because the program outputs each frame to standard output, you could track each frame's movement in a text file like this:
```
$ life > output.txt
```## flags
the default matrix size is 50, and the default frame rate is about every 100 ms. to use different values, supply them to the `--size` or `--speed` flags like this:```
# use a matrix of size 60 by 60, with a refresh every 140 ms
$ ./life --size=60 --speed=140
```## installation on a *nix style os _(probably works)_
assuming you have go installed:
```
# build it
$ go build .
# copy the binary to a directory on your path
$ cp life /usr/local/bin
```