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

@@ -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());
}
}