Documentation ¶
Index ¶
- Variables
- type ErrCreatePlayground
- type Playground
- func (pg *Playground) Area() engine.Area
- 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) LocationOccupied(location engine.Location) bool
- func (pg *Playground) UpdateObject(object interface{}, old, new engine.Location) error
- func (pg *Playground) UpdateObjectAvailableDots(object interface{}, old, new engine.Location) (engine.Location, error)
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) Area ¶
func (pg *Playground) Area() engine.Area
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) LocationOccupied ¶
func (pg *Playground) LocationOccupied(location engine.Location) bool
func (*Playground) UpdateObject ¶
func (pg *Playground) UpdateObject(object interface{}, old, new engine.Location) error
func (*Playground) UpdateObjectAvailableDots ¶
Click to show internal directories.
Click to hide internal directories.