changed return value when time runs out

This commit is contained in:
rektdie committed 2024-11-07 15:39:31 +01:00
1 parent 3b41c7765b
commit 5e97d3bcf8
1 file changed
+2 -2
+2 -2
View File
@@ -65,7 +65,7 @@ void ListScores(Board &board) {
} }
static SearchResults Quiescence(Board board, int alpha, int beta) { static SearchResults Quiescence(Board board, int alpha, int beta) {
if (searchStopped) return 0; if (searchStopped) return beta - alpha;
if (!benchStarted) { if (!benchStarted) {
auto currTime = std::chrono::high_resolution_clock::now(); auto currTime = std::chrono::high_resolution_clock::now();
@@ -116,7 +116,7 @@ static SearchResults Quiescence(Board board, int alpha, int beta) {
} }
SearchResults PVS(Board board, int depth, int alpha, int beta) { SearchResults PVS(Board board, int depth, int alpha, int beta) {
if (searchStopped) return 0; if (searchStopped) return beta - alpha;
if (!benchStarted) { if (!benchStarted) {
auto currTime = std::chrono::high_resolution_clock::now(); auto currTime = std::chrono::high_resolution_clock::now();