MaxWidth
untyped bigintValue
(50 <untyped> bigint)
MaxHeight
untyped bigintValue
(40 <untyped> bigint)
width
intValue
20
height
intValue
15
cells
[]bool- OID
- 04ad15…c31e:20
cells details
generation
intValue
0
population
intValue
5
init.7
func()- OID
- 04ad15…c31e:8
init.7 details
initBoard
func(w int, h int)- OID
- 04ad15…c31e:10
initBoard details
cellIdx
func(x int, y int) int- OID
- 04ad15…c31e:11
cellIdx details
alive
func(x int, y int) bool- OID
- 04ad15…c31e:12
alive details
countNeighbors
func(x int, y int) int- OID
- 04ad15…c31e:13
countNeighbors details
Step
func()Step advances the simulation by exactly one generation.
- OID
- 04ad15…c31e:14
Step details
MultiStep
func(n int)MultiStep advances the simulation by n generations (capped at 100).
- OID
- 04ad15…c31e:15
MultiStep details
SetCell
func(x int, y int, live bool)SetCell sets or clears a specific cell.
- OID
- 04ad15…c31e:16
SetCell details
Reset
func(w int, h int)Reset clears the board and resizes it to w×h.
- OID
- 04ad15…c31e:17
Reset details
LoadPreset
func(name string)LoadPreset loads a classic Game of Life pattern onto the current board. Names: glider, blinker, toad, beacon, block, pulsar.
- OID
- 04ad15…c31e:18
LoadPreset details
Render
func(path string) stringRender returns a Markdown snapshot of the current board.
- OID
- 04ad15…c31e:19
Render details
MaxWidth
:
untyped bigint
=(50 <untyped> bigint)
MaxHeight
:
untyped bigint
=(40 <untyped> bigint)
width
:
int
=20
height
:
int
=15
cells : []bool Inspect
generation
:
int
=0
population
:
int
=5