From 5e97d3bcf8756b7eef96e5f0e1749fa640c6f3f8 Mon Sep 17 00:00:00 2001 From: rektdie Date: Thu, 7 Nov 2024 15:39:31 +0100 Subject: [PATCH] changed return value when time runs out --- source/search.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/search.cpp b/source/search.cpp index a30b4a3..9b85db9 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -65,7 +65,7 @@ void ListScores(Board &board) { } static SearchResults Quiescence(Board board, int alpha, int beta) { - if (searchStopped) return 0; + if (searchStopped) return beta - alpha; if (!benchStarted) { 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) { - if (searchStopped) return 0; + if (searchStopped) return beta - alpha; if (!benchStarted) { auto currTime = std::chrono::high_resolution_clock::now();