package
module
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Apr 30, 2021
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Chess puzzle generators
Provides methods for generating chess puzzles from
pgn.
Provided methods:
AnalyzeGame(path string, r io.Reader) ([]Task, error)
- creates puzzles from one game from pgn
AnalyzeAllGames(path string, r io.Reader) ([]Task, error)
- analyzes all games from all games in pgn
Documentation
¶
type Task struct {
StartFEN string `json:"start_fen"`
FirstPossibleTurns []Turn `json:"first_possible_turns"`
IsWhiteTurn bool `json:"is_white_turn"`
}
type Turn struct {
SanNotation string `json:"san_notation"`
IsLastTurn bool `json:"is_last_turn,omitempty"`
AnswerTurnSanNotation string `json:"answer_turn_san_notation,omitempty"`
ContinueVariations []Turn `json:"continue_variations,omitempty"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.