Documentation
¶
Overview ¶
Package automata is a simple package for adding a felxable cellular automata simulations to go!
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cell ¶
type Cell struct {
Type string
XPos int
YPos int
Value float64
Grid *Grid
SimFunc func(*Cell)
DrawFunc func(*gg.Context, *Cell)
}
Cell remain mostly unchanged, they carry the Value Type which can carry type such as "air" or "wood" for tree simulation
type Grid ¶
Grid carrys a reference to and overidable function called simFunction. This is so the user can define a function and pass it to the specific Grid. That way they can run parrell simulations
func (*Grid) CopyGrid ¶
CopyGrid preforms a deep copy of the Grid to create new references in memory
func (*Grid) PrettyPrint ¶
func (g *Grid) PrettyPrint()
PrettyPrint prints the Grid to terminal, if it isn't pretty your Grid is wider then your terminal
func (*Grid) PrintPNG ¶
PrintPNG prints a png of the current Grid to the folder the program is ran in
func (*Grid) RunSimulation ¶
RunSimulation calls the Grids simulate function multiple times
