]> git.sesse.net Git - stockfish/blobdiff - src/uci.cpp
Stop is not an unknown command
[stockfish] / src / uci.cpp
index dbf735af15a018b487a9b0df4574e60534fa89ae..ff804f97a28476c3e644bd41f3ec71a744a066c7 100644 (file)
@@ -28,6 +28,7 @@
 #include "move.h"
 #include "position.h"
 #include "search.h"
+#include "thread.h"
 #include "ucioption.h"
 
 using namespace std;
@@ -60,8 +61,10 @@ void uci_loop() {
   string cmd, token;
   bool quit = false;
 
-  while (!quit && getline(cin, cmd))
+  while (!quit)
   {
+      Threads.getline(cmd);
+
       istringstream is(cmd);
 
       is >> skipws >> token;
@@ -69,6 +72,9 @@ void uci_loop() {
       if (token == "quit")
           quit = true;
 
+      else if (token == "stop")
+      { /* avoid to reply "Unknown command: stop" */ }
+
       else if (token == "go")
           quit = !go(pos, is);
 
@@ -91,7 +97,7 @@ void uci_loop() {
           pos.print();
 
       else if (token == "flip")
-          pos.flip();
+          pos.flip_me();
 
       else if (token == "eval")
       {