Skip cp in UCCI
authorFabian Fichter <ianfab@users.noreply.github.com>
Tue, 30 Nov 2021 08:18:47 +0000 (09:18 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Tue, 30 Nov 2021 08:18:47 +0000 (09:18 +0100)
Closes #413.

src/uci.cpp

index d7f483c..28e1a57 100644 (file)
@@ -419,7 +419,7 @@ string UCI::value(Value v) {
   } else
 
   if (abs(v) < VALUE_MATE_IN_MAX_PLY)
-      ss << "cp " << v * 100 / PawnValueEg;
+      ss << (Options["Protocol"] == "ucci" ? "" : "cp ") << v * 100 / PawnValueEg;
   else if (Options["Protocol"] == "usi")
       // In USI, mate distance is given in ply
       ss << "mate " << (v > 0 ? VALUE_MATE - v : -VALUE_MATE - v);