mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 01:56:58 +08:00
Fix perft 1
Compute correct number of moves for this corner case. A smal bug crept in after recent perft rework. No functional change.
This commit is contained in:
@@ -163,7 +163,7 @@ uint64_t Search::perft(Position& pos, Depth depth) {
|
|||||||
for (MoveList<LEGAL> it(pos); *it; ++it)
|
for (MoveList<LEGAL> it(pos); *it; ++it)
|
||||||
{
|
{
|
||||||
if (Root && depth <= ONE_PLY)
|
if (Root && depth <= ONE_PLY)
|
||||||
cnt = 1;
|
cnt = 1, nodes++;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pos.do_move(*it, st, ci, pos.gives_check(*it, ci));
|
pos.do_move(*it, st, ci, pos.gives_check(*it, ci));
|
||||||
|
|||||||
Reference in New Issue
Block a user