The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970.
- Any live cell with fewer than two live neighbours dies, as if caused by under-population.
- 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 over-population.
- Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
Clone the project to your computer. The project is an Android Studio project. To build the whole project, just select "Open an existing Android Studio project" when you open Android Studio.
The game comes with randomly generated game table. Also you can clear and draw your own patterns too. This application supports both landscape and portrait orientations.
Portrait:
Landscape:
This game includes one activity and one backgorund service. "LocalBroadcastManager" is used for commonicaiton between activity and backgroud service (GameService.java)
There is a singleton class "GameData.java" that holds game settings.
Observer Pattern is used for interactions of cells. When a cell changes its state its neighbour cells will observe this status change and keeps for next generation.
See the wikipedia article on Conway's Game of Life: https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
You can download demo applicaiton at Google Play Store https://play.google.com/store/apps/details?id=com.kaplandroid.gameoflife