Support perft command in xboard protocol
authorFabian Fichter <ianfab@users.noreply.github.com>
Tue, 12 Nov 2019 19:59:03 +0000 (20:59 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Tue, 12 Nov 2019 19:59:03 +0000 (20:59 +0100)
src/uci.cpp

index b2c5f1c..c9fbff9 100644 (file)
@@ -425,6 +425,14 @@ void UCI::loop(int argc, char* argv[]) {
                       xboard_go(pos, analysis_limits, states);
               }
           }
+          // Additional custom non-UCI commands, mainly for debugging.
+          else if (token == "perft")
+          {
+              Search::LimitsType perft_limits;
+              is >> perft_limits.perft;
+              xboard_go(pos, perft_limits, states);
+          }
+          // Move strings and unknown commands
           else
           {
               // process move string