Documentation
¶
Index ¶
- func MoveNumber(fen []string) (n uint8, err error)
- func PlayingTurn(fen []string) (c chess.Color, err error)
- func RemoveDiacritics(s string) string
- type Game
- type GameID
- type GamesIndex
- type Index
- type Move
- type OpeningName
- type OpeningsIndex
- type Position
- type PuzzleData
- type PuzzleID
- type PuzzlesIndex
- type SearchType
- type Turn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MoveNumber ¶
func RemoveDiacritics ¶
Types ¶
type GamesIndex ¶
func (GamesIndex) Insert ¶
func (i GamesIndex) Insert(id, moves string) error
func (GamesIndex) InsertFromChess ¶
func (i GamesIndex) InsertFromChess(id GameID, chessGame *chess.Game)
type Index ¶
type Index struct { Openings OpeningsIndex Games GamesIndex Puzzles PuzzlesIndex }
func (*Index) SearchOpening ¶
func (*Index) SearchPuzzles ¶
func (s *Index) SearchPuzzles( chessGame *chess.Game, strategy SearchType, turn chess.Color, maxMoves uint8, ) []PuzzleData
type Move ¶
func GameFromChess ¶
type OpeningName ¶
type OpeningName [2]string
func ParseOpeningName ¶
func ParseOpeningName(s string) (n OpeningName)
func (OpeningName) Empty ¶
func (n OpeningName) Empty() bool
func (OpeningName) Family ¶
func (n OpeningName) Family() string
func (OpeningName) FamilyTag ¶
func (n OpeningName) FamilyTag() string
func (OpeningName) String ¶
func (n OpeningName) String() string
func (OpeningName) Tag ¶
func (n OpeningName) Tag() string
func (OpeningName) Variation ¶
func (n OpeningName) Variation() string
func (OpeningName) VariationTag ¶
func (n OpeningName) VariationTag() string
type OpeningsIndex ¶
type OpeningsIndex map[[16]byte]OpeningName
func (OpeningsIndex) Insert ¶
func (i OpeningsIndex) Insert(name, moves string) error
type Position ¶
func PositionFromChess ¶
type PuzzleData ¶
func NewPuzzleData ¶
func NewPuzzleData(id, gameURL, fen string) (d PuzzleData, err error)
func (*PuzzleData) GobDecode ¶
func (d *PuzzleData) GobDecode(data []byte) (err error)
func (PuzzleData) GobEncode ¶
func (d PuzzleData) GobEncode() (out []byte, err error)
func (PuzzleData) URL ¶
func (d PuzzleData) URL() (url string)
type PuzzlesIndex ¶
type PuzzlesIndex map[string][]PuzzleData
func (PuzzlesIndex) Filter ¶
func (i PuzzlesIndex) Filter(openingTag string, side chess.Color, maxMoves uint8) iter.Seq[PuzzleData]
func (PuzzlesIndex) Insert ¶
func (i PuzzlesIndex) Insert(puzzleID, fen, gameURL, openingTags string) error
type SearchType ¶
type SearchType int8
const ( MoveSequenceSearch SearchType = iota PositionSearch )
func (SearchType) String ¶
func (t SearchType) String() string
Click to show internal directories.
Click to hide internal directories.