Documentation ¶
Index ¶
- func DeadOOB(_ *CellularAutomata[int]) func(int, int, bool, bool, bool, bool) *Cell[int]
- func LiveOOB(_ *CellularAutomata[int]) func(int, int, bool, bool, bool, bool) *Cell[int]
- func NothingOOB[T any](ca *CellularAutomata[T]) func(int, int, bool, bool, bool, bool) *Cell[T]
- func OverflowOOB[T any](ca *CellularAutomata[T]) func(int, int, bool, bool, bool, bool) *Cell[T]
- func RandomBottomOOB(_ *CellularAutomata[int]) func(int, int, bool, bool, bool, bool) *Cell[int]
- func RandomOOB(_ *CellularAutomata[int]) func(int, int, bool, bool, bool, bool) *Cell[int]
- type Cell
- type CellularAutomata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NothingOOB ¶
func OverflowOOB ¶
wrapping oob
func RandomBottomOOB ¶
random bottom oob
Types ¶
type CellularAutomata ¶
type CellularAutomata[T any] struct { ReadIndex, WriteIndex int // contains filtered or unexported fields }
func NewCellularAutomata ¶
func NewCellularAutomata[T any]( xMax, yMax int, ruleFunc func(*Cell[T], *CellularAutomata[T]) T, colorFunc func(T) color.NRGBA, oobCellFunc func(*CellularAutomata[T]) func(int, int, bool, bool, bool, bool) *Cell[T], initFillFunc func(*Cell[T], *CellularAutomata[T]) T, ) *CellularAutomata[T]
func (*CellularAutomata[T]) Bounding ¶
func (ca *CellularAutomata[T]) Bounding(x, y int) *Cell[T]
func (*CellularAutomata[T]) GenerateNextState ¶
func (ca *CellularAutomata[T]) GenerateNextState()
func (*CellularAutomata[T]) GetCellAt ¶
func (ca *CellularAutomata[T]) GetCellAt(x, y int) *Cell[T]
func (*CellularAutomata[T]) GetImageFromCurrentState ¶
func (ca *CellularAutomata[T]) GetImageFromCurrentState() image.Image
Click to show internal directories.
Click to hide internal directories.