December 2023
how to use this repo:
main branch: fully functional Game of Life, playable in four quadrants. Colors of the patterns are per type of pattern
observerpattern: experimental implementation of an observer pattern. this implementation is not stable! it shows the exploration of topics during the project.
The game of life is a cellular automaton created by John Horton Conway in 1970. As soon as the game has started, there is no further input by the player. It consists of an grid of cells, where every cell can either be alive or dead and is updated every generation, according to its interaction with its eight neighbours. This interaction is determined by rules, which define whether a cell will stay alive or die in the next generation.
They work as following:
- A live cell surrounded by fewer than two living cells dies, because of underpopulation.
- A live cell surrounded by two or three living cells stays alive.
- A live cell surrounded by more than three living cells dies, because of overpopulation.
- A dead cell surrounded by exactly three living cells becomes alive, due to reproduction.
To make the game more interesting, there will be different patterns of alive and dead cells, which can be chosen at the beginning of the game. These patterns will then change over generations, according to the specified rules.
There are different types of patterns, that are grouped by how they move over generations in the grid.
These are non-moving patterns. Here, all these patterns are shown in generation 1:
These are moving patterns which will return to their initial state after a certain number of generations.
These patterns are similar to the Oscillators, they will also return to their inital state after a certain number of generations, however on a different location on the grid.
These are moving patterns which evolve for a long period of generations before stabilizing themselves.