mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
Use st->gamePly to store fullMoves
This allow to retire do_setup_move() and also to simplify draw detection logic becuase now we always have: Min(st->rule50, st->gamePly) = st->rule50 This was already true when starting from starting position, but now is true even when starting from a FEN string because now we take in account fullmove number in counting gamePly so that it is always. st->rule50 <= st->gamePly No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -144,13 +144,13 @@ namespace {
|
||||
}
|
||||
else return;
|
||||
|
||||
// Parse move list (if any)
|
||||
SetupState.clear();
|
||||
|
||||
// Parse move list (if any)
|
||||
while (up >> token && (m = move_from_uci(pos, token)) != MOVE_NONE)
|
||||
{
|
||||
SetupState.push_back(StateInfo());
|
||||
pos.do_setup_move(m, SetupState.back());
|
||||
pos.do_move(m, SetupState.back());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user