Documentation ¶
Index ¶
- Variables
- type ErrCreatePlayground
- type Playground
- func (pg *Playground) CreateObject(object interface{}, location engine.Location) error
- func (pg *Playground) CreateObjectAvailableDots(object interface{}, location engine.Location) (engine.Location, error)
- func (pg *Playground) CreateObjectRandomByDotsMask(object interface{}, dm *engine.DotsMask) (engine.Location, error)
- func (pg *Playground) CreateObjectRandomDot(object interface{}) (engine.Location, error)
- func (pg *Playground) CreateObjectRandomRect(object interface{}, rw, rh uint8) (engine.Location, error)
- func (pg *Playground) CreateObjectRandomRectMargin(object interface{}, rw, rh, margin uint8) (engine.Location, error)
- func (pg *Playground) DeleteObject(object interface{}, location engine.Location) error
- func (pg *Playground) GetObjectByDot(dot engine.Dot) interface{}
- func (pg *Playground) GetObjects() []interface{}
- func (pg *Playground) GetObjectsByDots(dots []engine.Dot) []interface{}
- func (pg *Playground) Height() uint8
- func (pg *Playground) LocationOccupied(location engine.Location) bool
- func (pg *Playground) Navigate(dot engine.Dot, dir engine.Direction, dis uint8) (engine.Dot, error)
- func (pg *Playground) Size() uint16
- func (pg *Playground) UpdateObject(object interface{}, old, new engine.Location) error
- func (pg *Playground) UpdateObjectAvailableDots(object interface{}, old, new engine.Location) (engine.Location, error)
- func (pg *Playground) Width() uint8
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRetriesLimit = errors.New("retries limit was reached")
View Source
var FindRetriesNumber = 64
Functions ¶
This section is empty.
Types ¶
type ErrCreatePlayground ¶
type ErrCreatePlayground struct {
Err error
}
func (ErrCreatePlayground) Error ¶
func (e ErrCreatePlayground) Error() string
type Playground ¶
type Playground struct {
// contains filtered or unexported fields
}
func NewPlayground ¶
func NewPlayground(width, height uint8) (*Playground, error)
func (*Playground) CreateObject ¶
func (pg *Playground) CreateObject(object interface{}, location engine.Location) error
func (*Playground) CreateObjectAvailableDots ¶
func (*Playground) CreateObjectRandomByDotsMask ¶
func (*Playground) CreateObjectRandomDot ¶
func (pg *Playground) CreateObjectRandomDot(object interface{}) (engine.Location, error)
func (*Playground) CreateObjectRandomRect ¶
func (pg *Playground) CreateObjectRandomRect(object interface{}, rw, rh uint8) (engine.Location, error)
func (*Playground) CreateObjectRandomRectMargin ¶
func (pg *Playground) CreateObjectRandomRectMargin(object interface{}, rw, rh, margin uint8) (engine.Location, error)
func (*Playground) DeleteObject ¶
func (pg *Playground) DeleteObject(object interface{}, location engine.Location) error
func (*Playground) GetObjectByDot ¶
func (pg *Playground) GetObjectByDot(dot engine.Dot) interface{}
func (*Playground) GetObjects ¶
func (pg *Playground) GetObjects() []interface{}
func (*Playground) GetObjectsByDots ¶
func (pg *Playground) GetObjectsByDots(dots []engine.Dot) []interface{}
func (*Playground) Height ¶
func (pg *Playground) Height() uint8
func (*Playground) LocationOccupied ¶
func (pg *Playground) LocationOccupied(location engine.Location) bool
func (*Playground) Size ¶
func (pg *Playground) Size() uint16
func (*Playground) UpdateObject ¶
func (pg *Playground) UpdateObject(object interface{}, old, new engine.Location) error
func (*Playground) UpdateObjectAvailableDots ¶
func (*Playground) Width ¶
func (pg *Playground) Width() uint8
Click to show internal directories.
Click to hide internal directories.