Conway's game of life

From SEGGER Wiki
Jump to: navigation, search

Conways's game of life is simulation of the evolution of a population of simple organisms. Every pixel represents one cell and can have one of 2 states: Present or empty, typically represented by 1 and 0, and an illuminated or black pixel. Conways's game of life is a simulation of the evolution of a population of simple organisms. Every pixel represents one cell and can be in one of 2 states: Present(alive) or empty(dead), typically represented by 1 and 0, and an illuminated or black pixel. The rules for each generation are quite simple.

Rules

The rules for each generation are quite simple: The organism will be alive in the next generation if it either

   Is alive and has 2 or 3 neighbors
   Is dead and has exactly 3 neighbors

An example implementation in BASIC can be found here.