Use st->gamePly to store fullMoves
authorMarco Costalba <mcostalba@gmail.com>
Wed, 20 Jul 2011 08:01:12 +0000 (10:01 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 24 Jul 2011 05:15:36 +0000 (06:15 +0100)
commit3185c36a6554390d9061f1d74eb16a6c39caefb4
tree1bd4bfa57f20167ab1096591e060985f823ed993
parent3d8140a54101a50860ba2e3eb0f2d6cce68bfe47
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>
src/position.cpp
src/position.h
src/search.cpp
src/uci.cpp