mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 09:47:46 +00:00
Assorted cleanups in benchmark.cpp
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
+4
-4
@@ -252,22 +252,22 @@ void Search::init() {
|
||||
int64_t Search::perft(Position& pos, Depth depth) {
|
||||
|
||||
StateInfo st;
|
||||
int64_t sum = 0;
|
||||
int64_t cnt = 0;
|
||||
|
||||
MoveList<MV_LEGAL> ml(pos);
|
||||
|
||||
// At the last ply just return the number of moves (leaf nodes)
|
||||
if (depth <= ONE_PLY)
|
||||
if (depth == ONE_PLY)
|
||||
return ml.size();
|
||||
|
||||
CheckInfo ci(pos);
|
||||
for ( ; !ml.end(); ++ml)
|
||||
{
|
||||
pos.do_move(ml.move(), st, ci, pos.move_gives_check(ml.move(), ci));
|
||||
sum += perft(pos, depth - ONE_PLY);
|
||||
cnt += perft(pos, depth - ONE_PLY);
|
||||
pos.undo_move(ml.move());
|
||||
}
|
||||
return sum;
|
||||
return cnt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user