]> git.sesse.net Git - stockfish/commitdiff
Write out null-move and no move.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 17 Mar 2016 09:39:14 +0000 (10:39 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 24 Nov 2018 10:17:41 +0000 (11:17 +0100)
src/client.cpp

index 5bb480fa8d212428cae94c1f6ed648f4c4eee147..b3ec68f85cf6226042224bc27f7a8696a14c032f 100644 (file)
@@ -34,9 +34,15 @@ int main(int argc, char** argv) {
     Status status = stub->Probe(&context, request, &response);
 
     if (status.ok()) {
     Status status = stub->Probe(&context, request, &response);
 
     if (status.ok()) {
-      std::cout << response.found() << " "
-                << UCI::square(from_sq(Move(response.move())))
-                << UCI::square(to_sq(Move(response.move()))) << " ";
+      std::cout << response.found() << " ";
+      if (Move(response.move()) == MOVE_NULL) {
+        std::cout << "Null-move ";
+      } else if (Move(response.move()) == MOVE_NONE) {
+        std::cout << "MOVE_NONE ";
+      } else {
+        std::cout << UCI::square(from_sq(Move(response.move())))
+                  << UCI::square(to_sq(Move(response.move()))) << " ";
+      }
       switch (response.bound()) {
       case HashProbeResponse::BOUND_NONE:
         std::cout << "?";
       switch (response.bound()) {
       case HashProbeResponse::BOUND_NONE:
         std::cout << "?";