Discover Packages
github.com/gmkornilov/chess-puzzle-generator
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: ? modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
README
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
Expand ▾
Collapse ▴
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.