added perft command to UCI loop
This commit is contained in:
1 parent
3e5ed1ad85
commit
728e517c69
1 file changed
+7
@@ -9,6 +9,7 @@
|
||||
#include "benchmark.h"
|
||||
#include <cstring>
|
||||
#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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user