- int64_t perftCnt = perft(pos, maxDepth * ONE_PLY);
- cerr << "\nPerft " << maxDepth << " result (nodes searched): " << perftCnt << endl << endl;
- totalNodes += perftCnt;
- } else {
- if (!think(pos, false, false, dummy, dummy, 0, maxDepth, maxNodes, secsPerPos, moves))
+ int64_t cnt = perft(pos, limits.maxDepth * ONE_PLY);
+ totalNodes += cnt;
+
+ cerr << "\nPerft " << limits.maxDepth << " nodes counted: " << cnt << endl;
+ }
+ else
+ {
+ if (!think(pos, limits, moves))