Restore startpos_ply_counter() instead of full_moves()

And pass correct currentPly to TimeManager::init().

This restores old behaviour, in particular now black has
a different timing than white becuase is no more:

currentPly = 2 * fullMoveNumber;

but becomes

2 * (fullMoves - 1) + int(sideToMove == BLACK)

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2011-07-02 16:15:20 +01:00
parent 53ccba8457
commit ff41b8df76
4 changed files with 9 additions and 10 deletions

View File

@@ -25,7 +25,7 @@ struct SearchLimits;
class TimeManager {
public:
void init(const SearchLimits& limits, int fullMoveNumber);
void init(const SearchLimits& limits, int currentPly);
void pv_instability(int curChanges, int prevChanges);
int available_time() const { return optimumSearchTime + unstablePVExtraTime; }
int maximum_time() const { return maximumSearchTime; }