package
Version:
v0.0.5
Opens a new window with list of versions in this module.
Published: Sep 11, 2026
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package occupancy maps grid cells to owning entities (placed buildings, etc.).
type Map struct {
Width int
Height int
}
Map tracks which entity occupies each cell. Empty cells hold ecs.Nil.
func New(width, height int) *Map
New creates a Width×Height occupancy map (all empty).
At returns the entity at (x,y), if any.
Clear empties a single cell.
ClearRect empties every cell in fp that currently holds e (or any if e is Nil).
Set assigns e to a single cell.
SetRect assigns e to every cell in fp.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.