Game of Life
I've just written my first game in Scala, which is a functional/object-oriented programming language built upon Java. John Conway's Game of Life is a game base on simple mathematical rules. The game consists of a collection of cells which can live, die or multiply.
The Rules
A cell that is alive
- Each cell with one or no neighbors dies by starvation.
- Each cell with four or more neighbors dies by overpopulation.
- Each cell with two or three neighbors survives.
A cell that is dead
- Each cell with three neighbors becomes populated.
My Game of Life
![]() |
| I've made a small change to the game, converting Conway's game into a two player game. Each player starts with 10 points, each point can be turned into a living cell. |
![]() |
| After ten iterations, the game pauses, and the scored points can be turned into new living cells. |
![]() |
| The players wins who stays alive the longest, or who has the most alive cells when the board remains static and there are no more points to spend. Press 'C' to reset the board. |




