Revert "encapsulated positionIndex and moved isdraw to board class"
This reverts commit aa0d34eb8e.
This commit is contained in:
1 parent
3275cee01e
commit
ce01c7756b
7 files changed
+41
-35
No files matched your search
@@ -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();
|
||||
|
||||
|
||||
Reference in new issue
Block a user