Spectacular Cellular Automata
Website
Source Repository
Jira
Documents
Preparing search index...
lib/simulation
dayAndNightRule
Function dayAndNightRule
dayAndNightRule
(
cellState
:
0
|
1
,
aliveNeighbours
:
number
)
:
0
|
1
Day & Night Rule
Birth: Dead cell (0) with 3, 6, 7, or 8 neighbours becomes alive (1).
Survival: Alive cell (1) with 3, 4, 6, 7, or 8 neighbours remains alive.
Parameters
cellState
:
0
|
1
The current state of the cell (0 = DEAD, 1 = ALIVE)
aliveNeighbours
:
number
The number of alive neighbours
Returns
0
|
1
The new cell stata
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
Website
Source Repository
Jira
Documents
Spectacular Cellular Automata
Loading...
Day & Night Rule