Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zsoltk/GameOfLife
An Android implementation of Conway's Game of Life
https://github.com/zsoltk/GameOfLife
Last synced: about 1 month ago
JSON representation
An Android implementation of Conway's Game of Life
- Host: GitHub
- URL: https://github.com/zsoltk/GameOfLife
- Owner: zsoltk
- License: mit
- Created: 2015-03-16T21:44:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-31T19:04:05.000Z (almost 2 years ago)
- Last Synced: 2024-08-02T06:21:54.304Z (4 months ago)
- Language: Java
- Homepage:
- Size: 5.57 MB
- Stars: 98
- Watchers: 6
- Forks: 56
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-open-source-games - Game of Life - Conway's Game of Life with editable rules. (Mobile Games / Android)
README
# GameOfLife
[![](https://developer.android.com/images/brand/en_app_rgb_wo_60.png)](https://play.google.com/store/apps/details?id=hu.supercluster.gameoflife)An Android implementation of Conway's Game of Life, focusing on clean design and implementation
## About Game of Life
* [Stephen Hawking's The Meaning of Life (John Conway's Game of Life segment)](https://www.youtube.com/watch?v=CgOcEZinQ2I)
* [Video showing some epic creations](https://www.youtube.com/watch?v=C2vgICfQawE)
* [Wikipedia article] (http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life)## About the app
Changeable automaton rules, presets, and interactive board. Some interesting outcomes:![](http://i.imgur.com/jZPfMlv.png)
![](http://i.imgur.com/sDMRCJW.png)
![](http://i.imgur.com/FOdxb8i.png)
![](http://i.imgur.com/8bi2kLT.png)
![](http://i.imgur.com/wmSrTRt.png)
![](http://i.imgur.com/cwAe79y.png)## About the code
#### Used technologies
* [AndroidAnnotations](https://github.com/excilys/androidannotations)
* [Otto](square.github.io/otto/)
* [Hugo](https://github.com/JakeWharton/hugo)#### Running tests
Type ```./gradlew app:test```.Results can be checked in the generated HTML under ```app/build/reports/tests/debug/index.html```
#### Tampering around
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:1. Add your own implementation for Rule and CellularAutomata, and for CellColors if your automaton needs more than a basic dead / alive coloring:
* [Rule](https://github.com/zsoltk/GameOfLife/tree/master/app/src/main/java/hu/supercluster/gameoflife/game/rule)
* [CellullarAutomaton](https://github.com/zsoltk/GameOfLife/tree/master/app/src/main/java/hu/supercluster/gameoflife/game/cellularautomaton)
* [CellColors](https://github.com/zsoltk/GameOfLife/tree/master/app/src/main/java/hu/supercluster/gameoflife/game/visualization/cell)2. Use them in:
* [MainPresenter](https://github.com/zsoltk/GameOfLife/blob/master/app/src/main/java/hu/supercluster/gameoflife/app/activity/main/MainPresenter.java)3. If you're interested how the transformation is done, check:
* [Transformer](https://github.com/zsoltk/GameOfLife/tree/master/app/src/main/java/hu/supercluster/gameoflife/game/transformer)4. Have fun and message me if you create something cool!
#### Known limitations
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](https://github.com/zsoltk/GameOfLife/blob/master/app/src/main/java/hu/supercluster/gameoflife/game/transformer/ThreadedGridTransformer.java) 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.## Translations
**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