Skip to content

Instantly share code, notes, and snippets.

@lmars
Created December 11, 2011 23:01
Show Gist options
  • Save lmars/1463338 to your computer and use it in GitHub Desktop.
Save lmars/1463338 to your computer and use it in GitHub Desktop.
Game Of Life Rules

Game Of Life Rules

You have a grid of cells in 2 dimensions. Each cell has 2 possible states, alive or dead. Each cell has 8 neighbours: above, below, left, right, and the 4 diagonals.

  • any life cell < 2 neighbours dies
  • any life cell > 3 neighbours dies
  • any live cell with 2 or 3 neighbours lives to next generation
  • any dead cell with exactly 3 live neighbours becomes a live cell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment