3#include "ChessArbiter.hpp"
17 void BuildAndVerify(
HalfMove *m, std::string fen);
27 HalfMove(std::string move_absolute,std::string move_san);
28 HalfMove(std::string move_absolute,std::string move_san, std::string fen);
57 std::vector<HalfMove *>
GetLine();
58 std::string GetLineAsSAN();
59 std::map<char, std::uint8_t> GetLineCaptures();
61 void SetOpening(
const std::string &name,
const std::string &eco);
63 void GetOpening(std::string &name, std::string &eco);
65 void SetFen(std::string fen);
66 void SetCapture(
char c);
67 void GetAbsoluteMove(std::string &
src,std::string &dst);
68 void SetAbsoluteMove(
const std::string &move_absolute);
81 void BuildAndVerify(std::string initial_fen);
This class extends CGEHalfMove (to be displayed in the game editor)
Definition: HalfMove.hpp:13
std::string src
Store the source and destination square of the current move (mainly used for pieces animation)
Definition: HalfMove.hpp:19
void SetOpening(const std::string &name, const std::string &eco)
The opening name of current line.
Definition: HalfMove.cpp:14
chessarbiter::ChessArbiter arbiter
Arbiter used to ensure that chess rules are followed.
Definition: HalfMove.hpp:23
void GetOpening(std::string &name, std::string &eco)
Getters for name and eco.
Definition: HalfMove.cpp:26
bool HasParent(HalfMove *m)
Check if pointer m to a HalfMove is a parent of the current one.
Definition: HalfMove.cpp:134
bool HasChild(HalfMove *m)
Check if a given pointer m to a HalfMove is in mainline or variations of the current move.
Definition: HalfMove.cpp:138
char capture
Used in to retrieve captured pieces (see GetLineCaptures())
Definition: HalfMove.hpp:16
void AddMove(HalfMove *m)
Add mainline to the current move. If a mainline already exists, add to its variations.
Definition: HalfMove.cpp:98
std::vector< HalfMove * > GetLine()
Retrieve the list of moves from the current one to the first one.
Definition: HalfMove.cpp:31
bool IsVariation()
Check if current half move is within a variation.
Definition: HalfMove.cpp:151
std::string opening
Opening reach by that move while taking into account all the parents.
Definition: HalfMove.hpp:21
HalfMove * GetCurrentMoveWithFEN(const std::string fen)
Search if current move (move or its variations) contains a specific fen (usefull to not add moves tha...
Definition: HalfMove.cpp:166