Conway's Game of Life in PHP.
To run an example, just execute the run
command and pass the file containing
the world definition.
$ bin/conway run examples/gosper-glider-gun.gol
You can render a run into an animated gif using the gif
command. It's a good
idea to provide the number of generations with -n
.
$ bin/conway gif -n 300 examples/gosper-glider-gun.gol doc/gosper-glider-gun.gif
Note that performance is quite sluggish. On this machine it takes about 30 seconds to render 300 generations on the standard size grid of 120x50 cells.
Example output:
To render on a Mate Light installation,
use the matelight
command. You must supply the host name including the port.
$ bin/conway matelight matelight.cbrp3.c-base.org:1337 examples/gosper-glider-gun.gol
It will connect over UDP and render onto the 40x16 grid.
Alternate domain: ml.jaseg.net:1337
.
The gif
command requires gifsicle to be
installed.
- @__edorian for inspiration and hospitality