30#include <unordered_map>
43enum class NAG : std::uint_least8_t {
138[[nodiscard]] auto
from_pgn(std::string_view pgnText)
139 -> std::expected<
GameRecord, std::string_view>;
auto parse_all_pgns(std::string_view fileContent) -> std::vector< GameRecord >
auto to_pgn(const GameRecord &game, bool useBlockComments=true) -> string
auto from_pgn(std::string_view pgnText) -> std::expected< GameRecord, std::string_view >
@ BlackInitiative
Indicates that black has the initiative in this position.
@ WhiteSlightAdvantage
Indicates that white has a slight advantage in this position.
@ Good
A good move, typically displayed as !.
@ WhiteDecisiveAdvantage
Indicates that white has a decisive advantage in this position.
@ Brilliant
A brilliant move, typically displayed as !!.
@ Interesting
A speculative or interesting move, typically displayed as !?.
@ Unclear
Indicates that the position is unclear, typically displayed as an infinity symbol.
@ WhiteModerateAdvantage
Indicates that white has a moderate advantage in this position.
@ Inaccuracy
A mistake, typically displayed as ?.
@ BlackModerateAdvantage
Indicates that black has a moderate advantage in this position.
@ WhiteCrushingAdvantage
Indicates that white has a crushing advantage in this position (black should resign).
@ WhiteInitiative
Indicates that white has the initiative in this position.
@ Dubious
A questionable or dubious move, typically displayed as ?!.
@ BlackCrushingAdvantage
Indicates that black has a crushing advantage in this position (white should resign).
@ Null
A null annotation. Provided for usage as a placeholder value; should not appear in PGN files and has ...
@ Forced
A forced or only move, typically displayed as a white square.
@ Blunder
A blunder, typically displayed as ??.
@ Drawish
Indicates that the position is drawish or double-sided, typically displayed as =.
@ WhiteZugzwang
Indicates that white is in Zugzwang in this position.
@ BlackSlightAdvantage
Indicates that black has a slight advantage in this position.
@ BlackDecisiveAdvantage
Indicates that black has a decisive advantage in this position.
std::vector< Move > Variation
std::vector< Variation > variations
Position startingPosition
auto get_final_position() const -> Position
std::vector< Move > moves
std::optional< game::Result > result
std::unordered_map< string, string > metadata