midorikocak/game-of-life

A simple standalone OOP, Connway's gameoflife implementation with PHP

dev-master / 1.0.x-dev 2019-10-02 21:21 UTC

This package is not auto-updated.

Last update: 2024-11-05 19:58:28 UTC


README

Build Status Quality Score Coverage Status Software License

Connway's game of life implementeation using PHP some of best practices

Screenshot

Structure

data/
src/
tests/
vendor/

Install

Go to downloaded directory and use command

$ composer install

Usage

Using a file:

$ php life.php -v -f data/glider_gun.xml

Getting help:

$ php life.php -h

Connway's Game of Life by Midori Kocak

Usage: life.php [-f filename, --filename filename] [-h, --help] [-i iterations, --iterations iterations] [-o outputFilename, --outputFilename outputFilename (default: out.xml)] [-r, --random] [-s size, --size size] [-sp species, --species species] [-v, --verbose]

Optional Arguments:
	-r, --random
		Create Game of life from random matrix
	-i iterations, --iterations iterations
		Number of iterations
	-s size, --size size
		Square size of the world
	-sp species, --species species
		Amount of species
	-f filename, --filename filename
		File Name of XML input
	-o outputFilename, --outputFilename outputFilename (default: out.xml)
		File Name of XML output
	-v, --verbose
		Verbose output, shows GameOfLife in CLI
	-h, --help
		Prints a usage statement

Using a random array generated using size:

$ php life.php -r -s 40 -i 1024 -sp 1 -v

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ phpunit

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email midori@mynameismidori.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.