3#include "ChessArbiter.hpp"
6#include <unordered_map>
17 std::string initial_fen;
19 std::unordered_map<std::string, std::string> tags;
26 Game(std::string fen);
29 std::string GetBoard();
30 std::string GetTag(std::string tagname);
31 void SetTag(std::string tagname, std::string value);
32 void DeleteTag(std::string tagname);
37 std::string GetResult();
38 void GetOpening(std::string &name,std::string &eco);
40 bool Play(std::string move,
char promotion=
'q');
42 bool IsCheckmate(
bool forBlack);
52 std::vector<std::string> ListTags();
53 void SetResult(std::string result);
Hold an entire chess game. Used in many places in the projects.
Definition: Game.hpp:12
bool IsPromotionMove(std::string absolute_move)
Check if a given absolute move consists in a pawn promotion.
Definition: Game.cpp:105
HalfMove * current
64 char string that contains all the pieces on the board (used in BoardCanvas)
Definition: Game.hpp:14
void BuildAndVerify()
Build current game Verify and play all the moves in the game while building the fen for each move.
Definition: Game.cpp:215
void DeleteMove(HalfMove *m)
Delete a move (its mainline and variations recursively)
Definition: Game.cpp:61
chessarbiter::ChessArbiter arbiter
Used by various methods of the class.
Definition: Game.hpp:21
bool Play(std::string move, char promotion='q')
Play the given absolute move.
Definition: Game.cpp:111
This class extends CGEHalfMove (to be displayed in the game editor)
Definition: HalfMove.hpp:13