![]() |
Conquer Chess
Chess and Starcraft combined
|


Go to the source code of this file.
Classes | |
| class | pgn_move_string |
| A string that is a PGN notation string. More... | |
Functions | |
| std::optional< piece_type > | get_piece_type (const pgn_move_string &pgn_str) |
| Get a piece type for a string, if any. | |
| std::optional< square > | get_square (const pgn_move_string &pgn_str) |
| Get the square from a string, if any. | |
| std::optional< piece_type > | get_promotion_type (const pgn_move_string &pgn_str) |
| Get the type the piece is promoted to. | |
| std::optional< square > | get_to (const pgn_move_string &pgn_str) |
| Get the square a piece is moving to, if any. | |
| std::vector< chess_color > | get_winner (const pgn_move_string &pgn_str) |
| Get the winner from a notation. | |
| bool | is_capture (const pgn_move_string &pgn_str) |
| Conclude if the move is a capture from a PGN string E.g. | |
| void | test_pgn_move_string () |
| bool | operator== (const pgn_move_string &lhs, const pgn_move_string &rhs) noexcept |
| std::ostream & | operator<< (std::ostream &os, const pgn_move_string &s) noexcept |
| std::optional< piece_type > get_piece_type | ( | const pgn_move_string & | pgn_str | ) |
Get a piece type for a string, if any.
E.g. 'Nc3' will result in a knight, 'e4' will result in a pawn
| std::optional< piece_type > get_promotion_type | ( | const pgn_move_string & | pgn_str | ) |
Get the type the piece is promoted to.
Will be empty if this is no promotion
| std::optional< square > get_square | ( | const pgn_move_string & | pgn_str | ) |
Get the square from a string, if any.
E.g. 'Nc3' will result in 'c3'
@seealso same as get_to}
| std::optional< square > get_to | ( | const pgn_move_string & | pgn_str | ) |
Get the square a piece is moving to, if any.
E.g. 'Nc3' will result in 'c3'
@seealso same as get_square}
| std::vector< chess_color > get_winner | ( | const pgn_move_string & | pgn_str | ) |
Get the winner from a notation.
Assumes a win ('1-0' or '0-1') or a draw ('1/2-1/2').
| bool is_capture | ( | const pgn_move_string & | pgn_str | ) |
Conclude if the move is a capture from a PGN string E.g.
'Nxc3' will result in true
|
noexcept |
|
noexcept |
| void test_pgn_move_string | ( | ) |