Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
fen_string.h
Go to the documentation of this file.
1#ifndef FEN_STRING_H
2#define FEN_STRING_H
3
4#include "chess_color.h"
6
7#include <string>
8
20{
21public:
22 fen_string(const std::string& fen_str);
23
24 const auto& get() const noexcept { return m_fen_str; }
25
26private:
27
28 std::string m_fen_str;
29};
30
36 const chess_color active_player = chess_color::white
37);
38
41 const chess_color active_player = chess_color::white
42);
43
46
49
52
55
58
59
71
83
95
107
119
131
143
155
162
169
176
183
184void test_fen_string();
185
186bool operator==(const fen_string& lhs, const fen_string& rhs) noexcept;
187
188
189#endif // FEN_STRING_H
chess_color
A chess piece color.
Definition chess_color.h:10
Forsyth–Edwards Notation string.
Definition fen_string.h:20
const auto & get() const noexcept
Definition fen_string.h:24
fen_string get_fen_string_scholars_mate_2() noexcept
Get an FEN string for a position when doing a scholar's mate.
fen_string get_fen_string_scholars_mate_7() noexcept
Get an FEN string for a position when doing a scholar's mate.
fen_string get_fen_string_scholars_mate_0() noexcept
Get an FEN string for a position when doing a scholar's mate.
fen_string get_fen_string_game_over_white_no_king() noexcept
Get a FEN string for a game that is over: white has no king anymore.
Definition fen_string.cpp:48
void test_fen_string()
Definition fen_string.cpp:95
fen_string get_fen_string_game_over_white_checkmate() noexcept
Get a FEN string for a game that is over: white is in checkmate.
Definition fen_string.cpp:60
fen_string get_fen_string_scholars_mate_6() noexcept
Get an FEN string for a position when doing a scholar's mate.
fen_string get_fen_string_game_over_black_no_king() noexcept
Get a FEN string for a game that is over: black has no king anymore.
Definition fen_string.cpp:54
fen_string create_fen_string_of_standard_starting_position(const chess_color active_player=chess_color::white)
Create the FEN string of the standard starting position.
Definition fen_string.cpp:13
chess_color get_color(const fen_string &s)
Extract the color from a FEN string.
Definition fen_string.cpp:40
fen_string get_fen_string_scholars_mate_3() noexcept
Get an FEN string for a position when doing a scholar's mate.
fen_string get_fen_string_scholars_mate_5() noexcept
Get an FEN string for a position when doing a scholar's mate.
fen_string get_fen_string_wikipedia_4() noexcept
Get an example FEN string from Wikipedia.
fen_string get_fen_string_wikipedia_0() noexcept
Get an example FEN string from Wikipedia.
Definition fen_string.cpp:71
fen_string get_fen_string_game_over_black_checkmate() noexcept
Get a FEN string for a game that is over: black is in checkmate.
Definition fen_string.cpp:66
fen_string create_fen_string_with_starting_position(const starting_position_type t, const chess_color active_player=chess_color::white)
Definition fen_string.cpp:23
fen_string get_fen_string_wikipedia_1() noexcept
Get an example FEN string from Wikipedia.
Definition fen_string.cpp:76
fen_string get_fen_string_scholars_mate_4() noexcept
Get an FEN string for a position when doing a scholar's mate.
fen_string get_fen_string_wikipedia_2() noexcept
Get an example FEN string from Wikipedia.
Definition fen_string.cpp:83
fen_string get_fen_string_scholars_mate_1() noexcept
Get an FEN string for a position when doing a scholar's mate.
starting_position_type
The starting position type.
Definition starting_position_type.h:10