(2018) Nicolo Fabbiane
-
__init__.py
: library initialisation of Game of Life (GoL) -
examples/
: folder of the examplescannon.py
: Gosper's gliders cannonrand-init.py
: simultion from random initial condition
-
test/
: folder of the testing tools for the librarytest.py
: testing tools
-
libpy/
: folder of the sources of the sublibraries imported in__init__.py
classes.py
: data class definitionplot.py
: plotting toolsrules.py
: GoL rules library
The examples can be run via the Makefile
make examples example=<name-of-the-example>
The Gosper's gliders cannon is taken as initial condition.
The output is the file examples/cannon.gif
that collects in an animated
image the time evolution of the map.
The map is evolved starting from a random initial condition. The visualisation is based on a simple terminal-based text-output; the same visualisation technique is used in the tests.
The tests can be run via the Makefile
make test
and consist in reproducing some known solutions of the GoL, nominally:
- the steady square solution
- the period-two propeller
- the travelling glider
The success of the test is automatically checked by an assert
command.