Skip to content

bashtavenko/game-of-life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Conway's Game of Life

My take on core Conway's Game of Life implementation in different languages. This code may not be optimal or even correct.

Rules

  1. Live cell with fewer thatn two neighbours dies from starvation
  2. Live cell with two or three neighbours survives
  3. Live cell with more than three neighbours dies from overpopulation
  4. Dead cell with three neighbours becomes live (reproduction)

Example

3x3

Cell State Neighbours Next State Rule
1 Dead 2 Dead 4
2 Dead 3 Live 4
3 Live 1 Dead 1
4 Live 2 Live 2
5 Live 3 Live 2
6 Dead 3 Live 4
7 Dead 3 Live 4
8 Live 2 Live 2
9 Dead 2 Dead 4

About

Conway's Game of Life

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published