Split UCI into UCIEngine and Engine

This is another refactor which aims to decouple uci from stockfish. A new engine
class manages all engine related logic and uci is a "small" wrapper around it.

In the future we should also try to remove the need for the Position object in
the uci and replace the options with an actual options struct instead of using a
map. Also convert the std::string's in the Info structs a string_view.

closes #5147

No functional change
This commit is contained in:
Disservin
2024-03-17 12:33:14 +01:00
parent 0716b845fd
commit 299707d2c2
14 changed files with 341 additions and 149 deletions

View File

@@ -206,13 +206,15 @@ void bind_this_thread(size_t idx);
struct CommandLine {
public:
CommandLine(int, char**);
CommandLine(int _argc, char** _argv) :
argc(_argc),
argv(_argv) {}
static std::string get_binary_directory(std::string argv0);
static std::string get_working_directory();
int argc;
char** argv;
std::string binaryDirectory; // path of the executable directory
std::string workingDirectory; // path of the working directory
};
namespace Utility {