Documentation
¶
Overview ¶
Package life implements Conway's Game of Life independently of the terminal UI.
Index ¶
- type Grid
- func (g *Grid) Alive(x, y int) bool
- func (g *Grid) Clear()
- func (g *Grid) Height() int
- func (g *Grid) Population() int
- func (g *Grid) Randomize(density float64, seed uint64)
- func (g *Grid) Set(x, y int, alive bool)
- func (g *Grid) Step(wrap bool)
- func (g *Grid) Toggle(x, y int)
- func (g *Grid) Width() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Grid ¶
type Grid struct {
// contains filtered or unexported fields
}
Grid is a rectangular collection of cells stored row-major.
func (*Grid) Population ¶
Click to show internal directories.
Click to hide internal directories.