Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
MAX_VAL = 3
)
Functions ¶
func Abundance ¶
Abundance the color(s), which corresponds to a value [1-3], and the number of counted neighbors of that color [0-8]. Since there could be a tie for the highest count, multiple colors are returned in an array.
func NewNeighborhood ¶
Neighborhood represents the total color counts in the surrounding cells.
Types ¶
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
Field represents a two-dimensional field of cells.
type Life ¶
type Life struct {
// contains filtered or unexported fields
}
Life stores the state of a round of Conway's Game of Life.
func (*Life) LifeStateMessage ¶
LifeStateMessage returns an encoded Json message, ready to be sent.
Click to show internal directories.
Click to hide internal directories.