This is a proof of concept.
Play Conways Game Of Life directly in the Julia REPL!
This uses braille symbols to increase resolution and rendering speed, similar to the BrailleCanvas
from UnicodePlots.jl
Playing in the VSCode REPL:
REPLGameOfLife is registered in METADATA and can be installed using the package manager:
#enter package manager with ]
(v0.7) pkg> add REPLGameOfLife
After Installation, use the Package (using REPLGameofLife
) and start a game with gameoflife()
or its short form gol()
.
Keyword arguments:
pause
: Set the time between framessurvive
: How many live neighbors are needed to survivebirth
: how many live neighbors are needed for a birth
You can provide a starting environment as an array of 1's and 0's:
gol([
0 0 0 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 1 1 1 0
0 0 0 0 0 0
])
Alternatively you can start gol(p::Preset, size::Tuple(Int,Int))
using a preset:
gameoflife(Glider(), (40, 40))
Currently the following Presets are available:
- Glider
- BHeptomino
- GosperGun
PRs are welcome!