conway-php icon indicating copy to clipboard operation
conway-php copied to clipboard

Conway's Game of Life in PHP.

conway-php

Conway's Game of Life in PHP.

glider logo

Usage

Run

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

Gif

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:

glider gun

Mate Light

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.

Installation

The gif command requires gifsicle to be installed.

Further reading

Thanks