Documentation ¶
Index ¶
- Constants
- Variables
- func CompareDepths(zo, other DeepDrawer) int
- func LoadGame() (err error)
- func NewLifeGridFromRecord(record *model.Record) model.Recorder
- func NewLifeMoverFromRecord(record *model.Record) model.Recorder
- func SetupShape[T any](sh *Shape[T], name string, classn int32, color color.RGBA, width float32, ...)
- func ShapeFromRecord[T any](sh *Shape[T], record *model.Record)
- type Axis
- type Bounds
- type CellItemsOrg
- type CellOrg
- type CellsOrg
- func (cs *CellsOrg) Bounds() rl.Vector4
- func (cs *CellsOrg) Click(x, y int32)
- func (cs *CellsOrg) CountNeighbors(x, y int32) int
- func (cs *CellsOrg) Draw(v rl.Vector4)
- func (cs *CellsOrg) GetCells() [][]*CellOrg
- func (cs *CellsOrg) Input()
- func (cs *CellsOrg) Refresh(float64, rl.Vector4, ...func(any))
- func (cs *CellsOrg) SetColors(aliveColor, visitedColor, gridColor color.RGBA)
- func (cs *CellsOrg) Setup(clear bool)
- func (cs *CellsOrg) Update()
- type DeepDrawer
- type Drawer
- type Ellipse
- type EllipseItem
- type Game
- func (gs *Game) Actors() []Mover
- func (gs *Game) AddActor(a Mover, depth float32)
- func (gs *Game) AddDrawer(dr Drawer)
- func (gs *Game) AddNotebooks(options *notebooks.OptionBook, capture *notebooks.CaptureBook)
- func (gs *Game) BeginCapture(mode string)
- func (gs *Game) BuildDrawerList()
- func (gs *Game) BuildLists()
- func (gs *Game) BuildNotes()
- func (gs *Game) BuildTextureList()
- func (gs *Game) CheckKeys() notes.Command
- func (gs *Game) CheckPad(padNum int32) notes.Command
- func (gs *Game) Children() (children []model.Recorder)
- func (gs *Game) DrawStatus()
- func (gs *Game) Drawers() []Drawer
- func (game *Game) Dump()
- func (gs *Game) EndCapture()
- func (gs *Game) GetViewPort() rl.Rectangle
- func (gs *Game) LinkChild(recorder model.Recorder)
- func (gs *Game) NewGameSetup(width, height, fps int32)
- func (gs *Game) Options() (options *notebooks.OptionBook)
- func (gs *Game) ProcessInput(repeatinterval float64, repeatCh <-chan float64, stop <-chan int)
- func (gs *Game) Refresh(current float64)
- func (gs *Game) RefreshEnvironment()
- func (gs *Game) Run()
- func (gs *Game) Save(data *gizzmodb.Data) (err error)
- func (gs *Game) SetPad(pad pad.PadG)
- func (gs *Game) SetViewPort(rw, rh float32) rl.Rectangle
- func (gs *Game) SortDepthList() []DeepDrawer
- type GameItem
- type GridMover
- func (cm *GridMover[T]) AddDrawer(dr *NumberGrid[T])
- func (cm *GridMover[T]) Bounds() rl.Vector4
- func (cm *GridMover[T]) Children() []model.Recorder
- func (cm *GridMover[T]) Click(clickX, clickY int32)
- func (cs *GridMover[T]) CountNeighbors(cellX, cellY int32) int
- func (cm *GridMover[T]) Draw(v rl.Vector4)
- func (cm *GridMover[T]) GetDepth() float32
- func (cm *GridMover[T]) GetDrawer() Drawer
- func (cm *GridMover[T]) Input()
- func (cm *GridMover[T]) LinkChild(recorder model.Recorder)
- func (cm *GridMover[T]) Move(can_move bool, now float64)
- func (cm *GridMover[T]) Refresh(now float64, v rl.Vector4, f ...func(any))
- func (cm *GridMover[T]) Update()
- type GridMoverItem
- type HasDepth
- type Inputer
- type Motor
- type Mover
- type NumberCell
- type NumberGrid
- func (cs *NumberGrid[T]) Bounds() rl.Vector4
- func (cs *NumberGrid[T]) Draw(rl.Vector4)
- func (cs *NumberGrid[T]) GetCells() [][]*NumberCell[T]
- func (cs *NumberGrid[T]) Position(x, y int32) (int32, int32)
- func (cs *NumberGrid[T]) PositionToCell(posX, posY int32) (x, y int32)
- func (cs *NumberGrid[T]) Refresh(now float64, v rl.Vector4, funcs ...func(any))
- func (cs *NumberGrid[T]) SetupCells()
- type NumberGridItem
- type Pane
- type PaneItem
- type Player
- type ResizeState
- type Shape
- type ShapeItem
- type Texture
- type TextureItem
- type Tracker
- func (tr *Tracker) AddDrawer(dr Drawer)
- func (tr *Tracker) Bounds() rl.Vector4
- func (tr *Tracker) Children() []model.Recorder
- func (tr *Tracker) Draw(v rl.Vector4)
- func (tr *Tracker) GetDepth() float32
- func (tr *Tracker) GetDrawer() Drawer
- func (tr *Tracker) LinkChild(recorder model.Recorder)
- func (tr *Tracker) Move(can_move bool, now float64)
- func (tr *Tracker) Refresh(now float64, bounds rl.Vector4, fs ...func(any))
- type TrackerItem
- type ViewPort
Constants ¶
View Source
const ( Alive int32 = iota Visited Next GRIDMOVER_COUNT )
View Source
const ( XAxis int = iota YAxis ZAxis )
View Source
const Deepest float32 = 10000
Variables ¶
View Source
var ( Black = color.RGBA{R: 0, G: 0, B: 0, A: 255} White = color.RGBA{R: 255, G: 255, B: 255, A: 255} Red = color.RGBA{R: 255, G: 0, B: 0, A: 255} Yellow = color.RGBA{R: 255, G: 255, B: 0, A: 255} Green = color.RGBA{R: 0, G: 255, B: 0, A: 255} Cyan = color.RGBA{R: 0, G: 255, B: 255, A: 255} Blue = color.RGBA{R: 0, G: 0, B: 255, A: 255} Magenta = color.RGBA{R: 255, G: 0, B: 255, A: 255} )
Functions ¶
func CompareDepths ¶
func CompareDepths(zo, other DeepDrawer) int
func LoadGame ¶
func LoadGame() (err error)
LoadGame reconstructs a game from the database. A game is selected from the top entry of the key stack file. The stack and database are created or updated at the end of the build process.
func SetupShape ¶
Types ¶
type Axis ¶
type CellItemsOrg ¶
type CellsOrg ¶
type CellsOrg struct { model.RecorderClass[CellItemsOrg] }
func NewCellsOrg ¶
func NewCellsOrgFromRecord ¶
func (*CellsOrg) CountNeighbors ¶
type DeepDrawer ¶
func (*DeepDrawer) GetDepth ¶
func (dp *DeepDrawer) GetDepth() float32
type Ellipse ¶
type Ellipse struct { Shape[EllipseItem] }
func NewEllipse ¶
func NewEllipseFromRecord ¶
type EllipseItem ¶
type EllipseItem struct { }
type Game ¶
type Game struct { model.RecorderClass[GameItem] // contains filtered or unexported fields }
func NewGameFromRecord ¶
func (*Game) AddNotebooks ¶
func (gs *Game) AddNotebooks( options *notebooks.OptionBook, capture *notebooks.CaptureBook)
func (*Game) BeginCapture ¶
func (*Game) BuildNotes ¶
func (gs *Game) BuildNotes()
func (*Game) BuildTextureList ¶
func (gs *Game) BuildTextureList()
BuildTextureList of all textures from all drawers
func (*Game) DrawStatus ¶
func (gs *Game) DrawStatus()
func (*Game) EndCapture ¶
func (gs *Game) EndCapture()
func (*Game) GetViewPort ¶
func (*Game) NewGameSetup ¶
func (*Game) Options ¶
func (gs *Game) Options() (options *notebooks.OptionBook)
func (*Game) ProcessInput ¶
func (*Game) SortDepthList ¶
func (gs *Game) SortDepthList() []DeepDrawer
SortDepthList all drawers plus depth sorted by depth (ascending)
type GameItem ¶
type GameItem struct { Title string Description string Rules string Instructions string Author string BuildTime float64 FixedWidth float32 FixedHeight float32 FixedDepth float32 FixedSize bool FrameRate int64 BackGround color.RGBA // defaults to black CurrentFrameRate int64 Width float32 Height float32 Depth float32 InputInterval float64 CaptureDelay float64 CaptureDuration float64 Layout *layout.Layout OptionCurrent int32 // contains filtered or unexported fields }
type GridMover ¶
type GridMover[T numbers.NumberType] struct { model.RecorderClass[GridMoverItem[T]] }
func NewGridMover ¶
func (*GridMover[T]) AddDrawer ¶
func (cm *GridMover[T]) AddDrawer(dr *NumberGrid[T])
func (*GridMover[T]) CountNeighbors ¶
type GridMoverItem ¶
type NumberCell ¶
type NumberCell[T numbers.NumberType] struct { States []T }
func NewNumberCell ¶
func NewNumberCell[T numbers.NumberType](states int) *NumberCell[T]
func (*NumberCell[T]) Clear ¶
func (c *NumberCell[T]) Clear()
func (*NumberCell[T]) Get ¶
func (c *NumberCell[T]) Get(i int32) T
func (*NumberCell[T]) Set ¶
func (c *NumberCell[T]) Set(i int32, v T)
type NumberGrid ¶
type NumberGrid[T numbers.NumberType] struct { model.RecorderClass[NumberGridItem[T]] }
func (*NumberGrid[T]) Bounds ¶
func (cs *NumberGrid[T]) Bounds() rl.Vector4
func (*NumberGrid[T]) Draw ¶
func (cs *NumberGrid[T]) Draw(rl.Vector4)
func (*NumberGrid[T]) GetCells ¶
func (cs *NumberGrid[T]) GetCells() [][]*NumberCell[T]
func (*NumberGrid[T]) PositionToCell ¶
func (cs *NumberGrid[T]) PositionToCell(posX, posY int32) (x, y int32)
func (*NumberGrid[T]) Refresh ¶
func (cs *NumberGrid[T]) Refresh(now float64, v rl.Vector4, funcs ...func(any))
func (*NumberGrid[T]) SetupCells ¶
func (cs *NumberGrid[T]) SetupCells()
type NumberGridItem ¶
type ResizeState ¶
type ResizeState int
const ( RESIZE_SMALL ResizeState = iota RESIZE_NORMAL RESIZE_FULLSCREEN RESIZE_MINIMUM = RESIZE_SMALL )
type TextureItem ¶
type Tracker ¶
type Tracker struct { model.RecorderClass[TrackerItem] }
func NewTracker ¶
func NewTrackerFromRecord ¶
type TrackerItem ¶
Source Files ¶
- animator.go
- axis.go
- bounds.go
- cells_org.go
- ellipse.go
- game.go
- game_capture.go
- game_color.go
- game_gpad.go
- game_input.go
- game_keybd.go
- game_lists.go
- game_load.go
- game_run.go
- game_state.go
- game_status.go
- life_grid.go
- life_move.go
- number_cell.go
- number_grid.go
- number_grid_mover.go
- pane.go
- player.go
- resize_state.go
- shape.go
- texture.go
- tracker.go
- triangle.go
- viewport.go
- zorder.go
Click to show internal directories.
Click to hide internal directories.