diff options
| author | Adam <adammegarules1@gmail.com> | 2026-07-31 13:22:11 +0200 |
|---|---|---|
| committer | Adam <adammegarules1@gmail.com> | 2026-07-31 13:22:11 +0200 |
| commit | 2d148023f02056916fa5b88f567e09e6ba1a2915 (patch) | |
| tree | b7ac743f384a604061dfe25b8ac7180254e4960f | |
| parent | 6af6acefdece08bb786640f5f3e9618ae04881da (diff) | |
making it be mode ready
| -rw-r--r-- | CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/main.cpp | 4 | ||||
| -rw-r--r-- | src/misc.cpp | 8 | ||||
| -rw-r--r-- | src/misc.hpp | 9 | ||||
| -rw-r--r-- | src/uci.cpp | 2 |
5 files changed, 24 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d437a37..78560ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.24) -project(chess) +project(mono) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) diff --git a/src/main.cpp b/src/main.cpp index 36014b9..25082be 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,9 +1,13 @@ +#include "misc.hpp" #include "uci.hpp" #include "zobrist/zobrist.hpp" +#include <iostream> int main() { InitZobrist(); + std::cout << engine_info(); + Uci(); return 0; } diff --git a/src/misc.cpp b/src/misc.cpp new file mode 100644 index 0000000..8527fdc --- /dev/null +++ b/src/misc.cpp @@ -0,0 +1,8 @@ +#include "misc.hpp" +#include <string> + +std::string version = "0"; + +std::string engine_version() { return "Mono " + version; }; + +std::string engine_info() { return engine_version() + " by Adam " + "\n"; } diff --git a/src/misc.hpp b/src/misc.hpp new file mode 100644 index 0000000..6bf8e02 --- /dev/null +++ b/src/misc.hpp @@ -0,0 +1,9 @@ +#ifndef SRC_MICS_H_ +#define SRC_MICS_H_ + +#include <string> + +std::string engine_info(); +std::string engine_version(); + +#endif /* SRC_MICS_H_ */ diff --git a/src/uci.cpp b/src/uci.cpp index 818da90..89d28dd 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -2,6 +2,7 @@ #include "board/board.hpp" #include "board/fen.hpp" #include "bot.hpp" +#include "misc.hpp" #include "moves.hpp" #include "zobrist/zobrist.hpp" @@ -103,6 +104,7 @@ void Uci() { } } if (cmd == "uci") { + cout << "id name " << engine_version() << "\n"; cout << "uciok\n"; cout.flush(); } else if (cmd == "ucinewgame") { |
