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 "benchmark.h"
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include "tt.h"
|
#include "tt.h"
|
||||||
|
#include "perft.h"
|
||||||
|
|
||||||
Move ParseMove(Board &board, const char* moveString) {
|
Move ParseMove(Board &board, const char* moveString) {
|
||||||
GenerateMoves(board, board.sideToMove);
|
GenerateMoves(board, board.sideToMove);
|
||||||
@@ -240,6 +241,7 @@ void UCILoop(Board &board) {
|
|||||||
|
|
||||||
if (input.find("setoption") != std::string::npos) {
|
if (input.find("setoption") != std::string::npos) {
|
||||||
SetOption(input);
|
SetOption(input);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handling non-UCI "bench" command
|
// Handling non-UCI "bench" command
|
||||||
@@ -247,5 +249,10 @@ void UCILoop(Board &board) {
|
|||||||
RunBenchmark();
|
RunBenchmark();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (input.find("perft") != std::string::npos) {
|
||||||
|
Perft(board, ReadParam("perft", input));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user