Revert "encapsulated positionIndex and moved isdraw to board class"

This reverts commit aa0d34eb8e.
This commit is contained in:
rektdie committed 2025-04-12 10:59:04 +02:00
1 parent 3275cee01e
commit ce01c7756b
7 files changed
+41 -35

No files matched your search

+5 -1
View File
@@ -63,7 +63,8 @@ static void PlayRandMoves(Board &board) {
}
static bool IsGameOver(Board &board) {
if (board.IsDraw()) return true;
bool isDraw = SEARCH::IsDraw(board);
if (isDraw) return true;
int moveSeen = 0;
@@ -72,6 +73,7 @@ static bool IsGameOver(Board &board) {
bool isLegal = copy.MakeMove(board.moveList[i]);
if (!isLegal) continue;
positionIndex--;
moveSeen++;
}
@@ -97,6 +99,8 @@ void PlayGame(std::atomic<int>& positions, U64 targetPositions, std::vector<Game
Board board;
uint8_t wdl = 1;
// Since positionIndex is thread-local, no need to protect it
positionIndex = 0;
SEARCH::SearchContext ctx;