Cleaning code

This commit is contained in:
Loic Guegan 2022-02-25 13:38:49 +01:00
parent 6ccdc954c5
commit cbcc455e33
4 changed files with 13 additions and 16 deletions

View file

@ -29,6 +29,7 @@ std::string Game::GetTag(std::string tagname) { return (tags[tagname]); }
void Game::SetTag(std::string tagname, std::string value) {
tags[tagname] = value;
}
bool Game::IsBlackToPlay() {
if (current == NULL) {
return (false);
@ -55,6 +56,7 @@ void Game::DeleteMove(HalfMove *m) {
}
HalfMove *Game::GetCurrentMove() { return (current); }
HalfMove *Game::GetMoves() { return (moves); }
void Game::PromoteMove(HalfMove *m) {

View file

@ -37,5 +37,10 @@ public:
std::vector<std::string> ListTags();
std::string GetPGN();
void SetResult(std::string result);
/**
* @brief Build current game
* Verify and play all the moves in the game
* while building the fen for each move
*/
void BuildAndVerify();
};

View file

@ -55,5 +55,11 @@ public:
void SetFen(std::string fen);
void SetCapture(char c);
std::string GetPGN();
/**
* @brief Build current move
* Verify and play all the moves in the game
* while building the fen for each move
*/
void BuildAndVerify(std::string initial_fen);
};