encapsualted position index and array | bench 1857933
This commit is contained in:
1 parent
b669fa329e
commit
3225b9c665
8 files changed
+19
-28
No files matched your search
@@ -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();
|
||||
|
||||
|
||||
Reference in new issue
Block a user