]> git.sesse.net Git - stockfish/blobdiff - src/uci.cpp
Introduce namespace UCI
[stockfish] / src / uci.cpp
index 0ba4de3bddeb3cb9dd8c87eab097ed0a41afe00c..7e2f7ddf9e97df0ba9080ffee4893464793a908f 100644 (file)
 #include <string>
 
 #include "evaluate.h"
+#include "notation.h"
 #include "position.h"
 #include "search.h"
 #include "thread.h"
+#include "tt.h"
 #include "ucioption.h"
 
 using namespace std;
@@ -52,7 +54,7 @@ namespace {
 /// that we exit gracefully if the GUI dies unexpectedly. In addition to the UCI
 /// commands, the function also supports a few debug commands.
 
-void uci_loop(const string& args) {
+void UCI::loop(const string& args) {
 
   Position pos(StartFEN, false, Threads.main_thread()); // The root position
   string cmd, token;
@@ -93,7 +95,7 @@ void uci_loop(const string& args) {
           go(pos, is);
 
       else if (token == "ucinewgame")
-      { /* Avoid returning "Unknown command" */ }
+          TT.clear();
 
       else if (token == "isready")
           cout << "readyok" << endl;