playground

package
Version: v3.1.1-rc+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyLocation = errors.New("empty location")

Functions

This section is empty.

Types

type ErrCreateObject

type ErrCreateObject struct {
	Err error
}

func (*ErrCreateObject) Error

func (e *ErrCreateObject) Error() string

type ErrCreateObjectAvailableDots

type ErrCreateObjectAvailableDots struct {
	Err error
}

func (*ErrCreateObjectAvailableDots) Error

type ErrCreateObjectRandomByDotsMask

type ErrCreateObjectRandomByDotsMask string

func (ErrCreateObjectRandomByDotsMask) Error

type ErrCreateObjectRandomDot

type ErrCreateObjectRandomDot string

func (ErrCreateObjectRandomDot) Error

func (e ErrCreateObjectRandomDot) Error() string

type ErrCreateRandomRectMarginObject

type ErrCreateRandomRectMarginObject string

func (ErrCreateRandomRectMarginObject) Error

type ErrCreateRandomRectObject

type ErrCreateRandomRectObject string

func (ErrCreateRandomRectObject) Error

type ErrDeleteObject

type ErrDeleteObject struct {
	Err error
}

func (*ErrDeleteObject) Error

func (e *ErrDeleteObject) Error() string

type ErrLocationDotsOccupiedByObjects

type ErrLocationDotsOccupiedByObjects struct {
	Objects []interface{}
}

func (*ErrLocationDotsOccupiedByObjects) Error

type ErrLocationUsedByObject

type ErrLocationUsedByObject struct {
	Location engine.Location
}

func (*ErrLocationUsedByObject) Error

func (e *ErrLocationUsedByObject) Error() string

type ErrUpdateObject

type ErrUpdateObject struct {
	Err error
}

func (*ErrUpdateObject) Error

func (e *ErrUpdateObject) Error() string

type ErrUpdateObjectAvailableDots

type ErrUpdateObjectAvailableDots struct {
	Err error
}

func (*ErrUpdateObjectAvailableDots) Error

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) *ErrCreateObject

func (*Playground) CreateObjectAvailableDots

func (pg *Playground) CreateObjectAvailableDots(object interface{}, location engine.Location) (engine.Location, *ErrCreateObjectAvailableDots)

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) *ErrDeleteObject

func (*Playground) EntityExists

func (pg *Playground) EntityExists(object interface{}, location engine.Location) bool

func (*Playground) GetEntityByDot

func (pg *Playground) GetEntityByDot(dot engine.Dot) (interface{}, engine.Location)

func (*Playground) GetObjectByDot

func (pg *Playground) GetObjectByDot(dot engine.Dot) interface{}

func (*Playground) GetObjectByLocation

func (pg *Playground) GetObjectByLocation(location engine.Location) 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) LocationExists

func (pg *Playground) LocationExists(location engine.Location) bool

func (*Playground) Navigate

func (pg *Playground) Navigate(dot engine.Dot, dir engine.Direction, dis uint8) (engine.Dot, error)

func (*Playground) ObjectExists

func (pg *Playground) ObjectExists(object interface{}) bool

func (*Playground) Size

func (pg *Playground) Size() uint16

func (*Playground) UpdateObject

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

func (*Playground) UpdateObjectAvailableDots

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

func (*Playground) Width

func (pg *Playground) Width() uint8

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL