diff options
Diffstat (limited to 'src/game_tab/HalfMove.hpp')
| -rw-r--r-- | src/game_tab/HalfMove.hpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/game_tab/HalfMove.hpp b/src/game_tab/HalfMove.hpp index eefee21..36b9888 100644 --- a/src/game_tab/HalfMove.hpp +++ b/src/game_tab/HalfMove.hpp @@ -27,11 +27,30 @@ public: HalfMove(std::string move_absolute,std::string move_san, std::string fen); HalfMove(CMI::HalfMove *m); + /** + * @brief Add mainline to the current move. + * If a mainline already exists, add to its variations + * + * @param m the move to add + */ void AddMove(HalfMove *m); /// @brief Check if current half move is within a variation bool IsVariation(); - /// @brief Get the root of a variation + /** + * @brief Check if pointer @a m to a HalfMove is a parent of the current one + * + * @param m + * @return true + * @return false + */ bool HasParent(HalfMove*m); + /** + * @brief Check if a given pointer @a m to a HalfMove is in mainline or variations of the current move. + * + * @param m + * @return true + * @return false + */ bool HasChild(HalfMove*m); /// @brief Retrieve the list of moves from the current one to the first one std::vector<HalfMove *> GetLine(); |
