encapsulated positionHistory | bench 1857933
This commit is contained in:
1 parent
aa0d34eb8e
commit
2e8c23103f
6 files changed
+34
-37
No files matched your search
+3
-3
@@ -62,8 +62,8 @@ static void PlayRandMoves(Board &board) {
|
||||
MOVEGEN::GenerateMoves<All>(board);
|
||||
}
|
||||
|
||||
static bool IsGameOver(Board &board) {
|
||||
if (board.IsDraw()) return true;
|
||||
static bool IsGameOver(Board &board, SEARCH::SearchContext& ctx) {
|
||||
if (SEARCH::IsDraw(board, ctx)) return true;
|
||||
|
||||
int moveSeen = 0;
|
||||
|
||||
@@ -106,7 +106,7 @@ void PlayGame(std::atomic<int>& positions, U64 targetPositions, std::vector<Game
|
||||
SEARCH::SearchResults safeResults;
|
||||
MOVEGEN::GenerateMoves<All>(board);
|
||||
|
||||
while (!IsGameOver(board)) {
|
||||
while (!IsGameOver(board, ctx)) {
|
||||
SEARCH::SearchResults results = SEARCH::SearchPosition<SEARCH::datagen>(board, SearchParams(), ctx);
|
||||
|
||||
if (!results.bestMove) break;
|
||||
|
||||
Reference in new issue
Block a user