conway/README.md

47 lines
1.6 KiB
Markdown

# Conway game in ANSI C
```
Generation 0
.@...@@@@..@.@..@@@@..@.@....@@@..@.@@@.@@@@.@@@@.
.@.@@.@...@.@....@@.@.@.@.@.@....@@@@@@@@@@.@@.@..
@@.@@.@@..@@.@..@@@...@...@....@@@.@@@.@.@..@...@@
..@..@.@..@..@@.......@...@@...@..@.@@.@.@...@....
.....@.@.@.....@@..@@..@.@@@@@@.@..@@.@@@@@@@....@
@@@.@.@.@.@.....@@@...@..@..@.@@@@@.@....@.@@@@@..
@@@@@@.@@@@@...@@@@@@.@@@...@@@@...@@...@@@.@@@..@
.@@@@.@@.@.@..@.@..@@@..@..@.....@@@@@.@.@@.@..@@.
..@@.@@..@@..@@@....@.@..@@.......@.@.@@..@.@.@@..
@@.@.@.@@.@..@..@@.....@.@@..@....@.@@@@@.@@@@@@..
@...@@@.@.@@.@@@.@.@.@.@.@.........@@@@.@.@@@@.@..
@.@@@..@.@@.@@.@...@..@.@.@..@.@@.....@.@...@.@@..
.@.@@@@.@@@.......@@..@.@...@@.@...@.@@@@.@@.@..@@
@@@.@...@@@@.@....@@@.@@.@..@.@.@..@@.@.@.@@@@@@@.
.@@@.@..@@..@..@@@@.@..@@@......@@@@.@@@..@@...@@@
@@@@.........@.@.......@@.@@@@...@@.@@.@@@@@.@.@..
@..@@@@@......@@....@@@.....@.....@@@..@..@...@..@
@@..@..@.@@.@@..@@.@...@..@@@@.....@.@@........@@@
.@@...@@@........@@@@.@..@....@@@@@.@.@......@@...
@@.@@...@@...@@@@..@@.@@@@.....@.@.@@@@..@@.@.@.@@
```
An *ANSI C* implementation of [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life)
Compile with `make`
## Example usages
* Basic (default is random)
`./conway`
* 20x20 calc grid, 5x10 view grid
`./conway --calc 20x20 --view 5x10`
* Change chars
`./conway --dead-c - --alive-c Q`
* No heading, get 10th gen
`./conway --no-head --gen 10`
* Input initial sequence
`./conway --cells 5,5.6,6.4,7.5,7.6,7`
## Demonstration
[![asciicast](https://asciinema.org/a/PovKEcCgJLJKQJjOlfyHlTpCb.svg)](https://asciinema.org/a/PovKEcCgJLJKQJjOlfyHlTpCb)