Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
Classes | Functions
pgn_game_string.h File Reference
#include <string>
#include <vector>
Include dependency graph for pgn_game_string.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  pgn_game_string
 A string that is a PGN notation string of a game. More...
 

Functions

pgn_game_string get_replay_1_as_pgn_str () noexcept
 
pgn_game_string get_scholars_mate_as_pgn_str () noexcept
 Get the PGN for a scholar's mate.
 
std::vector< std::string > split_pgn_str (const pgn_game_string &pgn_str)
 Split the PGN string into its moves E.g.
 
void test_pgn_game_string ()
 
bool operator== (const pgn_game_string &lhs, const pgn_game_string &rhs) noexcept
 

Function Documentation

◆ get_replay_1_as_pgn_str()

pgn_game_string get_replay_1_as_pgn_str ( )
noexcept

◆ get_scholars_mate_as_pgn_str()

pgn_game_string get_scholars_mate_as_pgn_str ( )
noexcept

Get the PGN for a scholar's mate.

The PGN string is similar to this:

1. e4 e5 2. Qh5 Nc6 3. Bc4 Nf6?? Qxf7# 1-0

The positions of this scholar's mate are created by fen_string get_fen_string_scholars_mate_0}, fen_string get_fen_string_scholars_mate_1}, etc.

◆ operator==()

bool operator== ( const pgn_game_string lhs,
const pgn_game_string rhs 
)
noexcept

◆ split_pgn_str()

std::vector< std::string > split_pgn_str ( const pgn_game_string pgn_str)

Split the PGN string into its moves E.g.

'1. e4 e5 2. Nc3' will be split into {'e4', 'e5', 'Nc3'}

◆ test_pgn_game_string()

void test_pgn_game_string ( )