|
BenBot 1.7.5
A chess engine
|
#include <libchess/notation/PGN.hpp>
Classes | |
| struct | Move |
| struct | PositionPointer |
| struct | Variation |
Public Member Functions | |
| auto | get_final_position () const -> Position |
| auto | get_move_at_pos (const PositionPointer &pos) const -> const Move * |
| auto | get_starting_position () const -> Position |
Static Public Member Functions | |
| static auto | from_starting_position (const Position &pos) -> GameRecord |
Public Attributes | |
| std::unordered_map< string, string > | metadata |
| Variation | moves |
| std::optional< game::Result > | result |
Related Symbols | |
(Note that these are not member symbols.) | |
| auto | from_pgn (std::string_view pgnText) -> std::expected< GameRecord, std::string > |
| auto | parse_all_pgns (std::string_view fileContent) -> std::vector< GameRecord > |
| auto | to_pgn (const GameRecord &game, bool useBlockComments=true) -> string |
A record of a complete game, including some metadata. This structure is returned by the from_pgn() method.
Pointer class for keeping track of a specific move within a specific variation
get_all_moves_for(Pointer) function
|
inlinestaticnodiscard |
|
nodiscard |
Returns the final position of this game.
|
nodiscard |
|
inlinenodiscard |
| std::unordered_map<string, string> chess::notation::GameRecord::metadata |
| Variation chess::notation::GameRecord::moves |
| std::optional<game::Result> chess::notation::GameRecord::result |
If the game ended in a conclusive result, this holds the appropriate Result enumeration. If the game is ongoing, this is nullopt.
Note that this may be different from record.get_final_position().get_result(), as that function only accounts for decisive board state. This value may be set if a player resigned or the game was adjudicated.