Version: v4.2.2+incompatible Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2019 License: MIT Imports: 4 Imported by: 0




This section is empty.


View Source
var ErrRetriesLimit = errors.New("retries limit was reached")
View Source
var FindRetriesNumber = 64


This section is empty.


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 (pg *Playground) CreateObjectAvailableDots(object interface{}, location engine.Location) (engine.Location, error)

func (*Playground) CreateObjectRandomByDotsMask

func (pg *Playground) CreateObjectRandomByDotsMask(object interface{}, dm *engine.DotsMask) (engine.Location, error)

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

func (pg *Playground) UpdateObjectAvailableDots(object interface{}, old, new engine.Location) (engine.Location, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL