|
BenBot 1.7.5
A chess engine
|
Files | |
| file | Algebraic.hpp |
| file | EPD.hpp |
| file | FEN.hpp |
| file | ICCF.hpp |
| file | MoveFormats.hpp |
| file | PGN.hpp |
| file | UCI.hpp |
Namespaces | |
| namespace | chess |
| namespace | chess::notation |
Classes | |
| struct | chess::notation::EPDPosition |
| struct | chess::notation::GameRecord |
| struct | chess::notation::GameRecord::Move |
Functions | |
| auto | chess::notation::format_move (const MoveFormat format, const Position &position, const Move move) -> std::string |
| auto | chess::notation::from_alg (const Position &position, std::string_view text) -> std::expected< Move, std::string > |
| auto | from_epd (std::string_view epdString) -> std::expected< EPDPosition, string > |
| auto | chess::notation::from_fen (std::string_view fenString) -> std::expected< Position, std::string > |
| auto | chess::notation::from_iccf (const Position &position, std::string_view text) -> std::expected< Move, std::string > |
| auto | from_pgn (std::string_view pgnText) -> std::expected< GameRecord, std::string_view > |
| auto | chess::notation::from_uci (const Position &position, std::string_view text) -> std::expected< Move, std::string > |
| auto | parse_all_epds (std::string_view fileContent) -> std::vector< EPDPosition > |
| auto | parse_all_pgns (std::string_view fileContent) -> std::vector< GameRecord > |
| auto | chess::notation::to_alg (const Position &position, Move move) -> std::string |
| auto | to_epd (const EPDPosition &pos) -> string |
| auto | chess::notation::to_fen (const Position &position, bool alwaysWriteEPSqare=true) -> std::string |
| auto | chess::notation::to_iccf (Move move) -> std::string |
| auto | to_pgn (const GameRecord &game, bool useBlockComments=true) -> string |
| auto | chess::notation::to_uci (Move move) -> std::string |
Functions for working with various types of chess game notation.
|
strong |
This enum describes the supported notation formats for moves.
| Enumerator | |
|---|---|
| Algebraic | Algebraic notation. |
| ICCF | ICCF numeric notation. |
| UCI | UCI notation. |
Definition at line 40 of file MoveFormats.hpp.
|
strong |
PGN [1] NAG glyphs are represented by their numeric codes. This enumeration lists many of the standard NAGs (but not all of them).
|
inlinenodiscard |
Prints a move using the given notation format.
Definition at line 50 of file MoveFormats.hpp.
|
nodiscard |
Creates a move from a string in algebraic notation, such as "Nd4", "e8=Q", "O-O-O", etc.
This function expects Standard Algebraic Notation (SAN) strings.
If the input string cannot be parsed correctly, returns an explanatory error string.
|
Parses an EPD string.
If the input string cannot be parsed correctly, returns an explanatory error string.
|
nodiscard |
|
Parses the text of a PGN [1] file into a GameRecord object.
If the input string cannot be parsed correctly, returns an explanatory error string.
|
nodiscard |
Parses the UCI-format [3] algebraic notation string into a Move object. The current position is used to determine the type of the moved piece.
If the input string cannot be parsed correctly, returns an explanatory error string.
|
Parses all EPDs in a string containing one EPD per line.
|
Parses a text file that may contain 0 or more PGNs into a list of GameRecord objects. PGNs in the fileContent should be separated by at least 1 newline character. If parsing any of the PGNs fails, they will simply be omitted from the list, and any exceptions raised by parsing will not be propagated.
Returns the algebraic notation for the given Move object. This function creates Standard Algebraic Notation (SAN) strings. The current state of the position is used to determine whether the move is a capture, and the pieces of the side to move are used for disambiguation if necessary.
|
Writes a position to an EPD string.
|
nodiscard |
Returns the FEN representation of the given position.
| position | The position to serialize as a FEN string. |
| alwaysWriteEPSqare | If true, the en passant square will be written any time the last move was a pawn double-advance; if false, the en passant square will only be written if the opponent has any pawns capable of capturing en passant (as in X-FEN). |
|
nodiscard |
Returns the ICCF-format [2] notation for the given Move object.
|
|
nodiscard |
Returns the UCI-format [3] algebraic notation for the given Move object.