An Android implementation of Conway's Game of Life, focusing on clean design and implementation
- Stephen Hawking's The Meaning of Life (John Conway's Game of Life segment)
- Video showing some epic creations
- [Wikipedia article] (http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life)
Changeable automaton rules, presets, and interactive board. Some interesting outcomes:
Type ./gradlew app:test
.
Results can be checked in the generated HTML under app/build/reports/tests/debug/index.html
The code is intentionally implemented in a way to make it easy to create other types of cellular automata. Feel free to fork it and play around. For a starter:
-
Add your own implementation for Rule and CellularAutomata, and for CellColors if your automaton needs more than a basic dead / alive coloring:
-
Use them in:
-
If you're interested how the transformation is done, check:
-
Have fun and message me if you create something cool!
The approach used in the transformation logic is that only cell state changes are observed, and a counter of dead / alive neighbors is updated in every surrounding cell. By using the ThreadedGridTransformer it's fast enough to be smooth for Game of Life and most other rules. However, rules resulting in lots of changes around the screen might slow the game down.
A big thank you to the translators:
- Croatian by Lotti Sándorfi
- Estonian by Angéla Nagy and Berit Puidet
- French by Angéla Nagy
- German by Zoltán Török
- Latvian by Rolands Pragulbicks
- Russian by Natália Szvetlána Vaszkevics
- Ukrainian by Natália Szvetlána Vaszkevics