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:
Marco Costalba
2011-07-20 10:01:12 +02:00
parent 3d8140a541
commit 3185c36a65
4 changed files with 13 additions and 29 deletions

View File

@@ -393,7 +393,7 @@ bool think(Position& pos, const SearchLimits& limits, Move searchMoves[]) {
NodesSincePoll = 0;
current_search_time(get_system_time());
Limits = limits;
TimeMgr.init(Limits, pos.startpos_ply_counter());
TimeMgr.init(Limits, pos.game_ply());
// Set output steram in normal or chess960 mode
cout << set960(pos.is_chess960());