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

+2
View File
@@ -14,6 +14,7 @@ static U64 HelperPerft(Board board, int depth) {
bool isLegal = copy.MakeMove(board.moveList[i]);
if (!isLegal) continue;
nodes += HelperPerft(copy, depth - 1);
positionIndex--;
}
return nodes;
}
@@ -29,6 +30,7 @@ void Perft(Board &board, int depth) {
bool isLegal = copy.MakeMove(board.moveList[i]);
if (!isLegal) continue;
U64 nodeCount = HelperPerft(copy, depth - 1);
positionIndex--;
totalNodes += nodeCount;
board.moveList[i].PrintMove();