This class extends CGEHalfMove (to be displayed in the game editor)
More...
#include <HalfMove.hpp>
|
| HalfMove (HalfMove *m) |
|
| HalfMove (std::string move_absolute, std::string move_san) |
|
| HalfMove (std::string move_absolute, std::string move_san, std::string fen) |
|
| HalfMove (CMI::HalfMove *m) |
|
void | AddMove (HalfMove *m) |
| Add mainline to the current move. If a mainline already exists, add to its variations. More...
|
|
bool | IsVariation () |
| Check if current half move is within a variation.
|
|
bool | HasParent (HalfMove *m) |
| Check if pointer m to a HalfMove is a parent of the current one. More...
|
|
bool | HasChild (HalfMove *m) |
| Check if a given pointer m to a HalfMove is in mainline or variations of the current move. More...
|
|
std::vector< HalfMove * > | GetLine () |
| Retrieve the list of moves from the current one to the first one.
|
|
std::string | GetLineAsSAN () |
|
std::map< char, std::uint8_t > | GetLineCaptures () |
|
void | SetOpening (const std::string &name, const std::string &eco) |
| The opening name of current line.
|
|
void | GetOpening (std::string &name, std::string &eco) |
| Getters for name and eco.
|
|
std::string | GetFen () |
|
void | SetFen (std::string fen) |
|
void | SetCapture (char c) |
|
void | GetAbsoluteMove (std::string &src, std::string &dst) |
|
void | SetAbsoluteMove (const std::string &move_absolute) |
|
HalfMove * | GetCurrentMoveWithFEN (const std::string fen) |
| Search if current move (move or its variations) contains a specific fen (usefull to not add moves that already exist) More...
|
|
void | BuildAndVerify (std::string initial_fen) |
| Build current move Verify and play all the moves in the game while building the fen for each move.
|
|
|
void | BuildAndVerify (HalfMove *m, std::string fen) |
|
|
std::string | fen |
|
char | capture |
| Used in to retrieve captured pieces (see GetLineCaptures())
|
|
std::string | src |
| Store the source and destination square of the current move (mainly used for pieces animation)
|
|
std::string | dst |
|
std::string | opening |
| Opening reach by that move while taking into account all the parents.
|
|
std::string | eco |
|
chessarbiter::ChessArbiter | arbiter |
| Arbiter used to ensure that chess rules are followed.
|
|
This class extends CGEHalfMove (to be displayed in the game editor)
◆ AddMove()
Add mainline to the current move. If a mainline already exists, add to its variations.
- Parameters
-
◆ GetCurrentMoveWithFEN()
HalfMove * HalfMove::GetCurrentMoveWithFEN |
( |
const std::string |
fen | ) |
|
Search if current move (move or its variations) contains a specific fen (usefull to not add moves that already exist)
- Parameters
-
- Returns
- HalfMove* the move if found or nullptr
◆ HasChild()
Check if a given pointer m to a HalfMove is in mainline or variations of the current move.
- Parameters
-
- Returns
- true
-
false
◆ HasParent()
bool HalfMove::HasParent |
( |
HalfMove * |
m | ) |
|
Check if pointer m to a HalfMove is a parent of the current one.
- Parameters
-
- Returns
- true
-
false
The documentation for this class was generated from the following files:
- /home/loic/Documents/Git/ochess/src/game_tab/HalfMove.hpp
- /home/loic/Documents/Git/ochess/src/game_tab/HalfMove.cpp