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; + } } }