diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2023-01-16 14:55:48 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2023-01-16 14:55:48 +0100 |
| commit | 3b11b9d4f3eee5faa656d7ee61077e80726bdc36 (patch) | |
| tree | 7817c036843c18eac0012298ec7808d795411f58 /src/game_tab/HalfMove.hpp | |
| parent | b7667d1d40045ecd840b9b192c2740e5f83e7eba (diff) | |
Improve openings database code
Diffstat (limited to 'src/game_tab/HalfMove.hpp')
| -rw-r--r-- | src/game_tab/HalfMove.hpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/game_tab/HalfMove.hpp b/src/game_tab/HalfMove.hpp index 0666f38..bc56557 100644 --- a/src/game_tab/HalfMove.hpp +++ b/src/game_tab/HalfMove.hpp @@ -20,6 +20,8 @@ class HalfMove : public cgeditor::CGEHalfMove { void BuildAndVerify(HalfMove *m, std::string fen); /// @brief Store the source and destination square of the current move (mainly used for pieces animation) std::string src,dst; + /// @brief Opening reach by that move while taking into account all the parents + std::string opening, eco; public: HalfMove(HalfMove *m); @@ -49,9 +51,13 @@ public: HalfMove *GetParent(); HalfMove *GetMainline(); std::vector<HalfMove *> GetVariations(); - + /// @brief Retrieve the list of moves from the current one to the first one + std::vector<HalfMove *> GetLine(); std::map<char, std::uint8_t> GetLineCaptures(); - + /// @brief The opening name of current line + void SetOpening(const std::string &name, const std::string &eco); + /// @brief Getters for name and eco + void GetOpening(std::string &name, std::string &eco); /// @brief Set parent of the current move void SetParent(HalfMove *m); std::string GetFen(); |
