Documentation ¶
Overview ¶
Package notation implements parsing of chess positions.
Current supported formats are FEN and EPD notations. For EPD format see https://chessprogramming.wikispaces.com/Extended+Position+Description. For FEN format see https://chessprogramming.wikispaces.com/Forsyth-Edwards+Notation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EPD ¶
type EPD struct { Position *Position // first 4 fields Id string // id BestMove []Move // bm AvoidMove []Move // am Comment map[string]string // c0-c9 Evaluation *int32 // ce, centipawn evaluation if not nil }
EPD contains a parsed chess position in Extended Position Description. https://chessprogramming.wikispaces.com/Extended+Position+Description
type EPDScanner ¶
type EPDScanner struct {
// contains filtered or unexported fields
}
EPDScanner parses an input line by line and returns EPDs.
func NewEPDScanner ¶
func NewEPDScanner(r io.Reader, p Parser) *EPDScanner
NewEPDScanner returns a new scanner that reads epds from file one by one.
func (*EPDScanner) Scan ¶
func (es *EPDScanner) Scan() bool
Scan returns true if there was a new EPD read. If the EPD parsing erroneous then Scan returns true and sets the error.
Directories ¶
Path | Synopsis |
---|---|
Package epd implementes a parser for chess positions in EPD format.
|
Package epd implementes a parser for chess positions in EPD format. |
Package fen implementes a parser for chess positions in FEN format.
|
Package fen implementes a parser for chess positions in FEN format. |
Package moves provides functionally to parse a move in SAN representation.
|
Package moves provides functionally to parse a move in SAN representation. |