#include <libchess/notation/PGN.hpp>
A record of a complete game, including some metadata. This structure is returned by the from_pgn() method.
Definition at line 72 of file PGN.hpp.
◆ get_final_position()
| auto chess::notation::GameRecord::get_final_position |
( |
| ) |
const -> Position |
|
nodiscard |
Returns the final position of this game.
◆ metadata
| std::unordered_map<string, string> chess::notation::GameRecord::metadata |
This game's metadata. The keys will be things like "Event", "Site", "Date", etc. The values will not include surrounding quotes.
Definition at line 77 of file PGN.hpp.
◆ moves
| std::vector<Move> chess::notation::GameRecord::moves |
This game's moves.
Definition at line 124 of file PGN.hpp.
◆ result
| 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.
Definition at line 90 of file PGN.hpp.
◆ startingPosition
| Position chess::notation::GameRecord::startingPosition |
The starting position of this game.
Definition at line 80 of file PGN.hpp.
The documentation for this struct was generated from the following file:
- libchess/include/libchess/notation/PGN.hpp