blockers

package
v0.0.0-...-07f0968 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPiece

func GetPiece(idx uint8) *piece

get a piece.

func PiecesCount

func PiecesCount() uint8

Types

type Abandon

type Abandon struct{}

func (*Abandon) Do

func (a *Abandon) Do(c *app.Client) error

func (*Abandon) MustDo

func (a *Abandon) MustDo(c *app.Client)

func (*Abandon) Path

func (_ *Abandon) Path() string

type Game

type Game struct {
	game.Base
	PieceSetsEnded Bits       `json:"pieceSetsEnded"`
	PieceSets      Bits       `json:"pieceSets"`
	Board          pbit.Pbits `json:"board"`
}

func (*Game) GetBase

func (g *Game) GetBase() *game.Base

func (*Game) IsMyTurn

func (g *Game) IsMyTurn() bool

type Get

type Get struct {
	Game         ID         `json:"game"`
	UpdatedAfter *time.Time `json:"updatedAfter,omitempty"`
}

func (*Get) Do

func (a *Get) Do(c *app.Client) (*Game, error)

func (*Get) MustDo

func (a *Get) MustDo(c *app.Client) *Game

func (*Get) Path

func (_ *Get) Path() string

type Join

type Join struct {
	Game ID `json:"game"`
}

func (*Join) Do

func (a *Join) Do(c *app.Client) (*Game, error)

func (*Join) MustDo

func (a *Join) MustDo(c *app.Client) *Game

func (*Join) Path

func (_ *Join) Path() string

type New

type New struct{}

func (*New) Do

func (a *New) Do(c *app.Client) (*Game, error)

func (*New) MustDo

func (a *New) MustDo(c *app.Client) *Game

func (*New) Path

func (_ *New) Path() string

type Start

type Start struct {
	RandomizePlayerOrder bool `json:"randomizePlayerOrder"`
}

func (*Start) Do

func (a *Start) Do(c *app.Client) (*Game, error)

func (*Start) MustDo

func (a *Start) MustDo(c *app.Client) *Game

func (*Start) Path

func (_ *Start) Path() string

type TakeTurn

type TakeTurn struct {
	Piece    uint8  `json:"piece"`
	Position uint16 `json:"position"`
	Flip     Bit    `json:"flip"`
	Rotation uint8  `json:"rotation"`
	End      Bit    `json:"end"`
}

func (*TakeTurn) Do

func (a *TakeTurn) Do(c *app.Client) (*Game, error)

func (*TakeTurn) MustDo

func (a *TakeTurn) MustDo(c *app.Client) *Game

func (*TakeTurn) Path

func (_ *TakeTurn) Path() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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