blob: a74a2d64511916c93822be19ad6962c9d0e6064f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#pragma once
#include "UCI.hpp"
#include "ochess.hpp"
#include <wx/timer.h>
#include <algorithm>
wxDECLARE_EVENT(SHOW_ENGINE_EVALUATION, wxCommandEvent);
typedef struct EngineEvaluation {
std::vector<std::string> best_lines;
float eval=0;
} EngineEvaluation;
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);
};
|