engine

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup added in v0.0.3

func Setup(path string) error

func SetupFS added in v0.0.3

func SetupFS(filesystem fs.FS) error

Types

type Board

type Board struct {
	// Number of checkers in each point on the board.
	O CheckerLayout `json:"o"`

	// Number of checkers in each point on the board.
	X CheckerLayout `json:"x"`
}

type CheckerLayout added in v0.0.3

type CheckerLayout struct {
	N1  *int `json:"1,omitempty"`
	N10 *int `json:"10,omitempty"`
	N11 *int `json:"11,omitempty"`
	N12 *int `json:"12,omitempty"`
	N13 *int `json:"13,omitempty"`
	N14 *int `json:"14,omitempty"`
	N15 *int `json:"15,omitempty"`
	N16 *int `json:"16,omitempty"`
	N17 *int `json:"17,omitempty"`
	N18 *int `json:"18,omitempty"`
	N19 *int `json:"19,omitempty"`
	N2  *int `json:"2,omitempty"`
	N20 *int `json:"20,omitempty"`
	N21 *int `json:"21,omitempty"`
	N22 *int `json:"22,omitempty"`
	N23 *int `json:"23,omitempty"`
	N24 *int `json:"24,omitempty"`
	N3  *int `json:"3,omitempty"`
	N4  *int `json:"4,omitempty"`
	N5  *int `json:"5,omitempty"`
	N6  *int `json:"6,omitempty"`
	N7  *int `json:"7,omitempty"`
	N8  *int `json:"8,omitempty"`
	N9  *int `json:"9,omitempty"`
	Bar *int `json:"bar,omitempty"`
}

type Move

type Move struct {
	*openapi.Evaluation
	Play *[]openapi.CheckerPlay
}

func GetMoves

func GetMoves(m MoveArgs) ([]Move, error)

GetMoves exposes the gnubg moves for a particular (JSON) format

type MoveArgs

type MoveArgs struct {
	Board
	Cubeful  *bool
	Dice     []int
	MaxMoves *int
	Player
	ScoreMoves *bool
}

type Player

type Player openapi.MoveArgsPlayer

Jump to

Keyboard shortcuts

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