encapsulated positionIndex and moved isdraw to board class
This commit is contained in:
1 parent
dd6f0b94f5
commit
aa0d34eb8e
7 files changed
+35
-41
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