Documentation ¶
Index ¶
Constants ¶
View Source
const ( ALIVE = 1 DEAD = 0 A = 1 // ALIVE alias D = 0 // DEAD alias VOID = -1 )
Status of cells in the Game of Life grid
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Gol ¶
type Gol struct {
// contains filtered or unexported fields
}
Gol : game of life
func NewRandomGol ¶
NewRandomGol : creates a new random game of life
func ReadGolFromTextFile ¶
ReadGolFromTextFile : create a new Game of life from a text file
func (*Gol) GridEquals ¶
GridEquals : inform if two game of life instances have the same data,
ignoring the difference in generations value
func (*Gol) NextGeneration ¶
NextGeneration : compute the next generation
func (*Gol) SaveToFile ¶
SaveToFile : prints on stdout the current state of the grid
Click to show internal directories.
Click to hide internal directories.