Came across this simple algorithm. Built my own google-less version for the sake of displaying some skills.
Have fun.
Start by cloning this github repoitory. I won't pollute pypi for obvious
reason. The next step is usually creating a virtualenv
(or use the builtin
python -m venv
).
This project uses poetry to install itself and its dependencies. It is
an absolute improvement over the classic setup.py && pip
approach. It is
built by Sébastien Eustace and you can find the source here.
Click on this link to see how to install poetry. After poetry installation run the following command to install the project itself.
poetry install
Optionally, you can run a minimal package installation by running:
poetry install --no-dev
Assuming you created a virtual environment activate it and you can run the package directly:
gol --help
To run a preset game of life scenario use the following command:
gol preset oscilator
If you for some reason omitted the creation of a virtualenv
or forgot to
activate it poetry will have created one for you. You can then run all the
commands above by prepending poetry run
. E.g.
poetry run gol --help
poetry run gol preset oscilator
The suite comes fully tested. Poetry installs tox by default so you should be ready to start testing. Simply run:
tox
This runs multiple versions of python and a number of linting tools. If you however only want a single version run something like:
tox -e py,linters