Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Automaton ¶
type Automaton struct {
Cells [][]*Cell
BackCells [][]*Cell
History [][][]*Cell
Size *Vector2
Depth int
StatesCount int
Rule map[[3]int]int
HistoryIndex int
}
func NewAutomaton ¶
func (*Automaton) BuildCells ¶
func (*Automaton) BuildHistory ¶
func (*Automaton) TryToExplode ¶
type Drawer ¶
type Drawer struct {
Size *Vector2
Manager *Manager
Renderer *sdl.Renderer
Display *sdl.Texture
MustDraw bool
}
type Manager ¶
type Manager struct {
Window *sdl.Window
Drawer *Drawer
TextureManager *TextureManager
DrawEvent *sdl.UserEvent
IterationEvent *sdl.UserEvent
Running bool
WaitGroup sync.WaitGroup
Automaton *Automaton
CellSize *Vector2
Colors []*color.RGBA
MaxColorCount float64
ColorStep float64
RandomGenerator *rand.Rand
}
func NewManager ¶
func NewManager() *Manager
func (*Manager) BuildColors ¶
func (manager *Manager) BuildColors()
func (*Manager) RequestDraw ¶
func (manager *Manager) RequestDraw()
func (*Manager) RequestIteration ¶
func (manager *Manager) RequestIteration()
type Rectangle ¶
func NewRectangle ¶
type TextureManager ¶
func NewTextureManager ¶
func NewTextureManager(manager *Manager) *TextureManager
func (*TextureManager) Load ¶
func (textureManager *TextureManager) Load(name string)
Click to show internal directories.
Click to hide internal directories.