Documentation ¶
Index ¶
- Constants
- type Cell
- type CellType
- type Change
- type Chunk
- func (c *Chunk) ApplyChanges()
- func (c *Chunk) GetCell(x, y int) *Cell
- func (c *Chunk) GetCellAt(i int) *Cell
- func (c *Chunk) GetIndex(x, y int) int
- func (c *Chunk) InBounds(x, y int) bool
- func (c *Chunk) IsEmpty(x, y int) bool
- func (c *Chunk) IsEmptyAt(i int) bool
- func (c *Chunk) KeepAlive(x, y int)
- func (c *Chunk) KeepAliveAt(i int)
- func (c *Chunk) MoveCell(src *Chunk, x, y, dx, dy int)
- func (c *Chunk) SetCell(x, y int, cell *Cell)
- func (c *Chunk) SetCellAt(i int, cell *Cell)
- func (c *Chunk) UpdateRect()
- type Sandbox
- func (s *Sandbox) CreateChunk(x, y int) *Chunk
- func (s *Sandbox) Draw(pix []byte, screenWidth int, temp bool)
- func (s *Sandbox) GetCell(x, y int) *Cell
- func (s *Sandbox) GetChunk(x, y int) *Chunk
- func (s *Sandbox) GetChunkLocation(x, y int) (int, int)
- func (s *Sandbox) InBounds(x, y int) bool
- func (s *Sandbox) IsEmpty(x, y int) bool
- func (s *Sandbox) KeepAlive(x, y int)
- func (s *Sandbox) MoveCell(x, y, xn, yn int)
- func (s *Sandbox) MoveUpdate()
- func (s *Sandbox) RemoveEmptyChunks()
- func (s *Sandbox) SetCell(x, y int, cell *Cell)
- func (s *Sandbox) StateUpdate()
- func (s *Sandbox) TempUpdate()
- func (s *Sandbox) Update(temp bool)
- type Worker
- func (w *Worker) GetCell(x, y int) *Cell
- func (w *Worker) InBounds(x, y int) bool
- func (w *Worker) IsEmpty(x, y int) bool
- func (w *Worker) MoveCell(x, y, dx, dy int)
- func (w *Worker) MoveFire(x, y int, cell *Cell)
- func (w *Worker) MoveGas(x, y int, cell *Cell) (int, int)
- func (w *Worker) MoveLiquid(x, y int, cell *Cell)
- func (w *Worker) MovePowder(x, y int, cell *Cell)
- func (w *Worker) MoveSolid(x, y int, cell *Cell)
- func (w *Worker) SetCell(x, y int, cell *Cell)
- func (w *Worker) UpdateChunk()
- func (w *Worker) UpdateChunkState()
- func (w *Worker) UpdateChunkTemp()
- func (w *Worker) UpdateFire(x, y int)
- func (w *Worker) UpdatePlant(x, y int)
- func (w *Worker) UpdateReplicator(x, y int)
- func (w *Worker) UpdateSand(x, y int)
- func (w *Worker) UpdateSmoke(x, y int)
- func (w *Worker) UpdateSteam(x, y int)
- func (w *Worker) UpdateWater(x, y int)
Constants ¶
View Source
const MaxChunks = 10
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cell ¶
type Cell struct { CType CellType // contains filtered or unexported fields }
func (*Cell) IsFlamable ¶
func (*Cell) ThermalConductivity ¶
type Chunk ¶
type Chunk struct {
Width, Height int
X, Y int
// Dirty rect
MinX, MinY int
MaxX, MaxY int
// contains filtered or unexported fields
}
func (*Chunk) ApplyChanges ¶
func (c *Chunk) ApplyChanges()
func (*Chunk) KeepAliveAt ¶
func (*Chunk) UpdateRect ¶
func (c *Chunk) UpdateRect()
type Sandbox ¶
type Sandbox struct { Chunks []*Chunk // contains filtered or unexported fields }
func NewSandbox ¶
func (*Sandbox) CreateChunk ¶
func (*Sandbox) MoveUpdate ¶
func (s *Sandbox) MoveUpdate()
func (*Sandbox) RemoveEmptyChunks ¶
func (s *Sandbox) RemoveEmptyChunks()
func (*Sandbox) StateUpdate ¶
func (s *Sandbox) StateUpdate()
func (*Sandbox) TempUpdate ¶
func (s *Sandbox) TempUpdate()
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func (*Worker) MoveLiquid ¶
func (*Worker) MovePowder ¶
func (*Worker) UpdateChunk ¶
func (w *Worker) UpdateChunk()
func (*Worker) UpdateChunkState ¶
func (w *Worker) UpdateChunkState()
func (*Worker) UpdateChunkTemp ¶
func (w *Worker) UpdateChunkTemp()
func (*Worker) UpdateFire ¶
func (*Worker) UpdatePlant ¶
func (*Worker) UpdateReplicator ¶
func (*Worker) UpdateSand ¶
func (*Worker) UpdateSmoke ¶
func (*Worker) UpdateSteam ¶
func (*Worker) UpdateWater ¶
Click to show internal directories.
Click to hide internal directories.