This is a simple game of life application build with PHP. Rules of Game of Life:
- Any live cell with fewer than two live neighbours dies, as if by loneliness.
- Any live cell with more than three live neighbours dies, as if by overcrowding.
- Any live cell with two or three live neighbours lives, unchanged, to the next generation.
- Any dead cell with exactly three live neighbours comes to life.
Every generation is rebuild based on the previouse generation cells.
If you need to run this application just run the index.php
.
If you need to change the array combination just change the $resolution
value in index.php
.
$resolution = 10;
If you need to change the number of generation produced just change the $numberOfGeneration
value in index.php
.
$numberOfGeneration = 5;