component

package
v0.0.0-...-7a8c1c4 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoardProp

type BoardProp struct {
	Name        string
	Description string
	Score       int
	Step        int
	NoMove      bool
	Speed       int
	State       common.BoardState
	Color       common.ColorPair
	Size        image.Point
	BoardRect   image.Rectangle
	Direction   common.Direction
	FieldProps  *FieldProps
	List        []*TileProp
	Agent       agent.Agent
	IsFinished  bool
	Mode        common.PlayMode
}

func (BoardProp) CalculateDown

func (p BoardProp) CalculateDown() (score int)

func (BoardProp) CalculateLeft

func (p BoardProp) CalculateLeft() (score int)

func (BoardProp) CalculateRight

func (p BoardProp) CalculateRight() (score int)

func (BoardProp) CalculateUp

func (p BoardProp) CalculateUp() (score int)

func (BoardProp) CanMakeMove

func (p BoardProp) CanMakeMove(lst []int) bool

func (*BoardProp) MoveDown

func (p *BoardProp) MoveDown()

func (*BoardProp) MoveLeft

func (p *BoardProp) MoveLeft()

func (*BoardProp) MoveRight

func (p *BoardProp) MoveRight()

func (*BoardProp) MoveUp

func (p *BoardProp) MoveUp()

func (*BoardProp) NewTile

func (p *BoardProp) NewTile() (idx int, prop TileProp)

func (*BoardProp) ResolveIndexByFieldCoordinates

func (p *BoardProp) ResolveIndexByFieldCoordinates(x, y int) (idx int)

func (*BoardProp) ResolveScreenPositionByIndex

func (p *BoardProp) ResolveScreenPositionByIndex(idx int) (pos image.Point)

func (*BoardProp) SerializeList

func (p *BoardProp) SerializeList() (res []int)

func (BoardProp) UpdateMergedTiles

func (p BoardProp) UpdateMergedTiles(idx1 int, idx2 int, sum int, lst []int)

type FieldProps

type FieldProps struct {
	Position image.Point
	Sprite   *ebiten.Image
}

type Metrics

type Metrics struct {
	Ticker    *time.Ticker
	Gpu       string
	Tps       float64
	Fps       float64
	Component int
	Entities  int
	Systems   int
}

type TileProp

type TileProp struct {
	Value       int
	Position    image.Point
	EndPosition image.Point
	Speed       image.Point
	IsMoving    bool
	Removed     bool
	Sprite      *ebiten.Image
}

type TilePropWrap

type TilePropWrap struct {
	Ptr *TileProp
}

Jump to

Keyboard shortcuts

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