Modified from cse.msu.edu assignment
See also wiki entry
- Any live cell with fewer than two live neighbours dies, as if caused by underpopulation.
- Any live cell with two or three live neighbours lives on to the next generation.
- Any live cell with more than three live neighbours dies, as if by overpopulation.
- Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
Install gradle (i.e. brew install gradle
or something specific to your platform)
Run wrapper:
gradle wrapper
Requires Gradle
./gradlew run
- TODO
- Really should write some tests :-(
- Should make seed and number of children configurable.
- Would be nice to be able to run the generations until a stable pattern is found, if possible.
- Would be super cool to turn the output into an animated gif.
- Should test out some of the patterns in the wiki entry.
- Would be nice to have a random grid generator