encapsualted position index and array | bench 1857933

This commit is contained in:
rektdie committed 2025-04-12 20:39:00 +02:00
1 parent b669fa329e
commit 3225b9c665
8 files changed
+19 -28

No files matched your search

-2
View File
@@ -14,7 +14,6 @@ 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;
}
@@ -30,7 +29,6 @@ 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();