Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
Field contains all informations about the current status of all cells
func GenerateFirstRound ¶
GenerateFirstRound generates a new field with a (pseudo) random seed
func LoadFirstRound ¶
LoadFirstRound wraps LoadFirstRoundFromTXT or LoadFirstRoundFromRLE depending on the file extension
func LoadFirstRoundFromRLE ¶ added in v0.9.0
LoadFirstRound generates a new field from a rle-text-file
func LoadFirstRoundFromTXT ¶ added in v0.9.0
LoadFirstRound generates a new field from a text-file
func (*Field) LivingNeighbors ¶ added in v0.10.0
LivingNeighbors returns the number of living neighbors of a cell
func (*Field) NextRound ¶
NextRound looks at every cell and calculates its new value, it returns the new field
func (*Field) NextVitality ¶ added in v0.10.0
NextVitality returns the vitality of a cell in the next round
func (*Field) PrintField ¶
PrintField returns a string representing the value of all cells
Click to show internal directories.
Click to hide internal directories.