Documentation ¶
Index ¶
- type Event
- type EventType
- type World
- func (w *World) CreateObject(object interface{}, location engine.Location) error
- func (w *World) CreateObjectAvailableDots(object interface{}, location engine.Location) (engine.Location, error)
- func (w *World) CreateObjectRandomByDotsMask(object interface{}, dm *engine.DotsMask) (engine.Location, error)
- func (w *World) CreateObjectRandomDot(object interface{}) (engine.Location, error)
- func (w *World) CreateObjectRandomRect(object interface{}, rw, rh uint8) (engine.Location, error)
- func (w *World) CreateObjectRandomRectMargin(object interface{}, rw, rh, margin uint8) (engine.Location, error)
- func (w *World) DeleteObject(object interface{}, location engine.Location) error
- func (w *World) Events(stop <-chan struct{}, buffer uint) <-chan Event
- func (w *World) GetObjectByDot(dot engine.Dot) interface{}
- func (w *World) GetObjects() []interface{}
- func (w *World) GetObjectsByDots(dots []engine.Dot) []interface{}
- func (w *World) Height() uint8
- func (w *World) LocationOccupied(location engine.Location) bool
- func (w *World) Navigate(dot engine.Dot, dir engine.Direction, dis uint8) (engine.Dot, error)
- func (w *World) Size() uint16
- func (w *World) Start(stop <-chan struct{})
- func (w *World) UpdateObject(object interface{}, old, new engine.Location) error
- func (w *World) UpdateObjectAvailableDots(object interface{}, old, new engine.Location) (engine.Location, error)
- func (w *World) Width() uint8
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Type EventType Payload interface{} }
ffjson: nodecoder
func (*Event) MarshalJSON ¶
MarshalJSON marshal bytes to json - template
func (*Event) MarshalJSONBuf ¶
func (j *Event) MarshalJSONBuf(buf fflib.EncodingBuffer) error
MarshalJSONBuf marshal buff to json - template
type World ¶
type World struct {
// contains filtered or unexported fields
}
func (*World) CreateObject ¶
func (*World) CreateObjectAvailableDots ¶
func (*World) CreateObjectRandomByDotsMask ¶
func (*World) CreateObjectRandomDot ¶
func (*World) CreateObjectRandomRect ¶
func (*World) CreateObjectRandomRectMargin ¶
func (*World) DeleteObject ¶
func (*World) GetObjectByDot ¶
func (*World) GetObjects ¶
func (w *World) GetObjects() []interface{}
func (*World) GetObjectsByDots ¶
func (*World) UpdateObject ¶
func (*World) UpdateObjectAvailableDots ¶
Click to show internal directories.
Click to hide internal directories.