#pragma once #include "UCI.hpp" #include "ochess.hpp" #include #include wxDECLARE_EVENT(SHOW_ENGINE_EVALUATION, wxCommandEvent); /// @brief Contains the current engine evaluation (sorted vector of best lines + position score in cp) typedef struct EngineEvaluation { std::vector best_lines; float eval=0; } EngineEvaluation; /** * @brief Dialog to control the current running engine on the game tab * */ class LiveEngineDialog : public DialogLiveEngine { uciadapter::UCI *engine; std::string engine_name; std::string confGroup; std::string optmultipv; wxTimer timer; /// @brief The following time interval definitely need to be configure in the user settings (set to 1s for now) std::uint32_t interval; public: LiveEngineDialog(wxWindow *parent, std::uint32_t engine_id); ~LiveEngineDialog(); void InitEngine(); void TogglePauseEngine(wxCommandEvent &event); void OnTimerTick(wxTimerEvent &event); void SetFEN(std::string fen); void StopEngine(); void StartEngine(); void OnClose(wxCloseEvent &e); };