Versions in this module Expand all Collapse all v1 v1.0.0 Aug 10, 2026 v0 v0.1.0 Aug 9, 2026 Changes in this version + const ColorBlack + const ColorWhite + const PieceBishop + const PieceKing + const PieceKnight + const PieceNone + const PiecePawn + const PieceQueen + const PieceRook + func Perft(g Game, depth int) int + type Action struct + CapturedPiece Piece + FromPiece Piece + IsCapture bool + IsCastle bool + IsDraw bool + IsEnPassantCapture bool + IsKingsideCastle bool + IsPromotion bool + IsQueensideCastle bool + IsResign bool + PromotionPieceType PieceType + ToXY XY + func (a Action) DebugString() string + func (a Action) ICCF() string + func (a Action) String() string + type Board struct + Board []string + CanBlackKingsideCastle bool + CanBlackQueensideCastle bool + CanWhiteKingsideCastle bool + CanWhiteQueensideCastle bool + EnPassantTargetSquare string + FullMoveNumber int + HalfMoveClock int + Turn string + type Color = color + type Game struct + Actions []Action + CanBlackCastle bool + CanBlackKingsideCastle bool + CanBlackQueensideCastle bool + CanClaimDraw bool + CanWhiteCastle bool + CanWhiteKingsideCastle bool + CanWhiteQueensideCastle bool + EnPassantTargetSquare XY + FullMoveNumber int + GameOverWinner color + HalfMoveClock int + InCheckBy []Piece + IsCheck bool + IsCheckmate bool + IsDiscoverCheck bool + IsDoubleCheck bool + IsDraw bool + IsGameOver bool + IsLastMoveEnPassant bool + IsStalemate bool + MoveNumber int + func NewDefaultGame() Game + func NewGameFromBoard(b Board) (Game, error) + func NewGameFromFEN(s string) (Game, error) + func (g Game) Clone() Game + func (g Game) DoAction(a Action) Game + func (g Game) King(c color) Piece + func (g Game) PieceAt(xy XY) Piece + func (g Game) Pieces(c color) []Piece + func (g Game) PositionHistory() []uint64 + func (g Game) String() string + func (g Game) ToBoard() Board + func (g Game) ToFEN() string + func (g Game) Turn() color + func (g Game) WithPositionHistory(history []uint64) Game + type GameStep struct + StepAction Action + StepComment string + StepGame Game + StepPreMoveGame Game + StepString string + func (s GameStep) Clone() GameStep + type Piece struct + Owner color + PieceType PieceType + XY XY + func (p Piece) String() string + type PieceType int + func (t PieceType) String() string + func (t PieceType) ToAlgebraic() string + func (t PieceType) ToColorFigurine(c color) string + func (t PieceType) ToDescriptive(useKt bool) string + func (t PieceType) ToFigurine() string + func (t PieceType) ToICCF() string + func (t PieceType) ToSmith() string + type XY struct + X int + Y int + func (c XY) ToAlgebraic() string + func (c XY) ToDescriptive(turn color, useKt ...bool) string + func (c XY) ToICCF() string