BenBot 1.7.5
A chess engine
Loading...
Searching...
No Matches
chess::notation Namespace Reference

Classes

struct  EPDPosition
struct  GameRecord
struct  Move
struct  Position
class  string
 STL class. More...

Enumerations

enum class  MoveFormat : std::uint_least8_t { MoveFormat::Algebraic , MoveFormat::ICCF , MoveFormat::UCI }
enum class  NAG : std::uint_least8_t {
  NAG::Null = 0 , NAG::Good = 1 , NAG::Brilliant = 3 , NAG::Inaccuracy = 2 ,
  NAG::Blunder = 4 , NAG::Interesting = 5 , NAG::Dubious = 6 , NAG::Forced = 7 ,
  NAG::Drawish = 10 , NAG::Unclear = 13 , NAG::WhiteSlightAdvantage = 14 , NAG::WhiteModerateAdvantage = 16 ,
  NAG::WhiteDecisiveAdvantage = 18 , NAG::WhiteCrushingAdvantage = 20 , NAG::BlackSlightAdvantage = 15 , NAG::BlackModerateAdvantage = 17 ,
  NAG::BlackDecisiveAdvantage = 19 , NAG::BlackCrushingAdvantage = 21 , NAG::WhiteZugzwang = 22 , NAG::WhiteInitiative = 36 ,
  NAG::BlackInitiative = 37
}

Functions

auto format_move (const MoveFormat format, const Position &position, const Move move) -> std::string
auto 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 from_fen (std::string_view fenString) -> std::expected< Position, std::string >
auto 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 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 to_alg (const Position &position, Move move) -> std::string
auto to_epd (const EPDPosition &pos) -> string
auto to_fen (const Position &position, bool alwaysWriteEPSqare=true) -> std::string
auto to_iccf (Move move) -> std::string
auto to_pgn (const GameRecord &game, bool useBlockComments=true) -> string
auto to_uci (Move move) -> std::string

Detailed Description

This namespace contains functions for working with various types of chess game notation.