aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp4
-rw-r--r--src/misc.cpp8
-rw-r--r--src/misc.hpp9
-rw-r--r--src/uci.cpp2
4 files changed, 23 insertions, 0 deletions
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") {