diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-01-25 10:53:10 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-01-25 10:53:10 +0100 |
| commit | 4f1d7c524744861ee9cd3052c2ec9e42e83a32ca (patch) | |
| tree | f2be23409388665dc0766be9ba89ee94db9c9379 /src/HalfMove.hpp | |
| parent | e817ac6bed46737839b592b4308c6d525d70aa2d (diff) | |
Refactoring
Diffstat (limited to 'src/HalfMove.hpp')
| -rw-r--r-- | src/HalfMove.hpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/HalfMove.hpp b/src/HalfMove.hpp new file mode 100644 index 0000000..dc238cd --- /dev/null +++ b/src/HalfMove.hpp @@ -0,0 +1,38 @@ +#include <sstream> +#include <string> +#include <vector> + +namespace pgnp { + +/** + * Most members are public for conveniance sake + */ +class HalfMove { +private: + /// @brief Recursive dump + std::string NestedDump(HalfMove *, int); + +public: + /// @brief Contains current move count + int count; + /// @brief Is this move for black + bool isBlack; + /// @brief The SAN move + std::string move; + /// @brief Comment associated to the move + std::string comment; + /// @brief Next HalfMove link to this line + HalfMove *MainLine; + /// @brief Next HalfMove links to variation of this line + std::vector<HalfMove *> variations; + + HalfMove(); + ~HalfMove(); + /// @brief Get number of HalfMove in the MailLine + int GetLength(); + /// @brief Dump move and all its variations + std::string Dump(); + /// @brief Perform a deep copy of a HalfMove + void Copy(HalfMove *copy); +}; +} // namespace pgnp
\ No newline at end of file |
