]> git.sesse.net Git - stockfish/blobdiff - src/client.cpp
Write out null-move and no move.
[stockfish] / src / client.cpp
index 02980b8d4cb5aff56a4b110db14ca2a2754a450e..b3ec68f85cf6226042224bc27f7a8696a14c032f 100644 (file)
@@ -34,12 +34,21 @@ int main(int argc, char** argv) {
     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 << "?";
+        break;
       case HashProbeResponse::BOUND_EXACT:
+        std::cout << "==";
         break;
       case HashProbeResponse::BOUND_UPPER:
         std::cout << "<=";
@@ -48,7 +57,7 @@ int main(int argc, char** argv) {
         std::cout << ">=";
         break;
       } 
-      std::cout << UCI::value(Value(response.value())) << " ";
+      std::cout << " " << UCI::value(Value(response.value())) << " ";
       std::cout << response.depth() << std::endl;
     } else {
       std::cout << "ERROR" << std::endl;