From 728e517c691f93a0ddfe0204c8853905b8aa73a6 Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 10 Mar 2025 07:45:22 +0100 Subject: [PATCH] added perft command to UCI loop --- source/uci.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/uci.cpp b/source/uci.cpp index fc264d5..1adbcfc 100644 --- a/source/uci.cpp +++ b/source/uci.cpp @@ -9,6 +9,7 @@ #include "benchmark.h" #include #include "tt.h" +#include "perft.h" Move ParseMove(Board &board, const char* moveString) { GenerateMoves(board, board.sideToMove); @@ -240,6 +241,7 @@ void UCILoop(Board &board) { if (input.find("setoption") != std::string::npos) { SetOption(input); + continue; } // Handling non-UCI "bench" command @@ -247,5 +249,10 @@ void UCILoop(Board &board) { RunBenchmark(); continue; } + + if (input.find("perft") != std::string::npos) { + Perft(board, ReadParam("perft", input)); + continue; + } } }