Documentation
¶
Overview ¶
Package interiors keeps the rooms of the board's cells and who stands in each: it tells the rules as one comes in and goes out, and has whoever is in a room drawn in the light that gets into it.
NewPlugin takes the world and the board. Run its RunPlan after the board's.
A room ¶
A room is a thing standing in pieces (world.Whole): its pieces are the floors with a room of its cells (cell.Floor with Clear, dug or Standing), its handle marked Room, its floor as high as the handle's world.Z. What of the sky's light gets into it is the handle's light.Shelter, laid by whoever builds the room: the sun by its openings, windows and doors on its walls, a share of the sky's light and of the sun's thrown round, and its lamp. A house's room is the buildings plugin's, a tunnel's and a chamber's the underground's.
Who is in it ¶
An entity on the board stands in the room whose floor its feet are on: it carries Inside while it does, the rules hosted on Entered and Left told once as it comes in and goes out, and is light.Sheltered under its handle's shelter, where it has one: drawn in the light that gets in there, worked out on the GPU pixel by pixel, casting no shadow. Read says which room lies on a cell's storey, whether an entity drawn uncovered stands in it (for whoever draws what covers the room) and its lamp's light.
Vocabulary ¶
Moments, for a role's rules: Entered, Left. Components: Room (marking a room's handle), Inside (on whoever stands in one).
Index ¶
- type Entered
- type Inside
- type Left
- type Plugin
- func (p *Plugin) EventHandler() control.EventHandler
- func (p *Plugin) Install(ctx plugin.Installer) error
- func (p *Plugin) Name() string
- func (p *Plugin) Read(int) *Read
- func (p *Plugin) RunPlan(ctx goke.RunCtx, d time.Duration)
- func (p *Plugin) Serializable() plugin.Serializable
- func (p *Plugin) String() string
- type Read
- type Room
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entered ¶
Entered is an entity coming into a room, told once as it does: Room is the room's whole.
type Inside ¶
Inside is the room an entity on the board stands in, its whole; none where it is in none.
type Plugin ¶
Plugin keeps the rooms of the board's cells and who stands in each, and tells the rules as one comes in and goes out.
func (*Plugin) EventHandler ¶
func (p *Plugin) EventHandler() control.EventHandler
func (*Plugin) RunPlan ¶
RunPlan finds who stands in which room in the simulation; call it after the board's.
func (*Plugin) Serializable ¶
func (p *Plugin) Serializable() plugin.Serializable
Serializable is nil: the rooms and who is in them are entities, saved as any.
type Read ¶
type Read struct {
// contains filtered or unexported fields
}
Read reads the rooms on the game's goroutine.
func (*Read) At ¶
At is the room whose floor lies on the storey of c, its whole, as the last step found.