From a84b210ca397194ad360175cf89451f319121e6c Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Thu, 19 Jan 2023 13:06:36 +0100 Subject: Integrate CMI --- examples/wxWidgets/MyHalfMove.hpp | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) (limited to 'examples/wxWidgets/MyHalfMove.hpp') diff --git a/examples/wxWidgets/MyHalfMove.hpp b/examples/wxWidgets/MyHalfMove.hpp index dfb8860..84cc5e6 100644 --- a/examples/wxWidgets/MyHalfMove.hpp +++ b/examples/wxWidgets/MyHalfMove.hpp @@ -1,5 +1,6 @@ +#pragma once + #include "CGEditor.hpp" -#include /** * @brief Create your custom half move class @@ -8,32 +9,10 @@ * an overview of how to keep your move sync with the one of CGEditor * */ -class MyHalfMove : public cgeditor::CGEHalfMove { - MyHalfMove *parent = NULL; - MyHalfMove *mainline = NULL; - std::vector variations; +class MyHalfMove : public CMI::HalfMove { public: MyHalfMove(std::string move); - ~MyHalfMove(); - /// @brief Add variation to current move - void AddVariation(MyHalfMove *m); - /// @brief Remove the specified child from mainline and/or variations - void RemoveChild(MyHalfMove *m); - /// @brief Set value of the mailine - void SetMainline(MyHalfMove *m); - /// @brief Set this move as mainline - void SetAsMainline(); - /// @brief Promote the current move and submove - void Promote(); - /// @brief Check if current half move is within a variation - bool IsVariation(); - /// @brief Get the root of a variation - MyHalfMove* GetRoot(); - /// @brief Get parent of the current move - MyHalfMove* GetParent(); - /// @brief Set parent of the current move - void SetParent(MyHalfMove *m); }; /// @brief Build the example game to use in the editor -- cgit v1.2.3