dummy-link

REPLGameOfLife

A simple Game of Life implementation which is usable from the REPL

Readme

REPLGameOfLife

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:

Screenshot

Installation

REPLGameOfLife is registered in METADATA and can be installed using the package manager:

#enter package manager with ]
(v0.7) pkg> add REPLGameOfLife

Playing

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 frames
  • survive: How many live neighbors are needed to survive
  • birth: how many live neighbors are needed for a birth

Environments and Presets

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!

First Commit

06/25/2018

Last Touched

about 1 year ago

Commits

5 commits

Requires:

Used By: