1#ifndef PGN_MOVE_STRING_H
2#define PGN_MOVE_STRING_H
20 const auto&
get() const noexcept {
return m_pgn_str; }
23 std::string m_pgn_str;
A string that is a PGN notation string.
Definition pgn_move_string.h:16
const auto & get() const noexcept
Definition pgn_move_string.h:20
std::optional< square > get_square(const pgn_move_string &pgn_str)
Get the square from a string, if any.
Definition pgn_move_string.cpp:43
std::ostream & operator<<(std::ostream &os, const pgn_move_string &s) noexcept
Definition pgn_move_string.cpp:121
std::optional< piece_type > get_piece_type(const pgn_move_string &pgn_str)
Get a piece type for a string, if any.
Definition pgn_move_string.cpp:13
bool operator==(const pgn_move_string &lhs, const pgn_move_string &rhs) noexcept
Definition pgn_move_string.cpp:116
std::optional< piece_type > get_promotion_type(const pgn_move_string &pgn_str)
Get the type the piece is promoted to.
Definition pgn_move_string.cpp:31
std::optional< square > get_to(const pgn_move_string &pgn_str)
Get the square a piece is moving to, if any.
Definition pgn_move_string.cpp:55
std::vector< chess_color > get_winner(const pgn_move_string &pgn_str)
Get the winner from a notation.
Definition pgn_move_string.cpp:60
void test_pgn_move_string()
Definition pgn_move_string.cpp:69
bool is_capture(const pgn_move_string &pgn_str)
Conclude if the move is a capture from a PGN string E.g.
Definition chess_move.cpp:53