]> git.sesse.net Git - stockfish/commit
Fix startpos_ply_counter() regression
authorMarco Costalba <mcostalba@gmail.com>
Sun, 24 Jul 2011 04:59:16 +0000 (05:59 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 24 Jul 2011 05:59:14 +0000 (06:59 +0100)
commitfc290dc30b1f6a50fd5fd6732c276ff76305f2aa
tree9366dff6dd2a2387f372900ac26a605836b7a39d
parent5f7eb20090ccd04b2a7d439b723ed58591dcc7e8
Fix startpos_ply_counter() regression

Return the correct number of played plies at the end
of the setup moves. Currently it always returns 0 when
starting from start position, like in real games.

We fix this adding st->pliesFromNull that starts from 0
and is incremented after each setup move and is never
reset in the setup phase but only once search is started.

It is an hack because startpos_ply_counter() will return
different values during the search and is correct only
at the beginning of the search.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/position.h
src/uci.cpp