mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08:00
New Time management system
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
committed by
Marco Costalba
parent
87139d018c
commit
c0616d773d
@@ -270,6 +270,8 @@ public:
|
||||
// Number of plies since the last non-reversible move
|
||||
int rule_50_counter() const;
|
||||
|
||||
int startpos_ply_counter() const;
|
||||
|
||||
// Other properties of the position
|
||||
bool opposite_colored_bishops() const;
|
||||
bool has_pawn_on_7th(Color c) const;
|
||||
@@ -280,6 +282,8 @@ public:
|
||||
// Reset the gamePly variable to 0
|
||||
void reset_game_ply();
|
||||
|
||||
void inc_startpos_ply_counter();
|
||||
|
||||
// Position consistency check, for debugging
|
||||
bool is_ok(int* failedStep = NULL) const;
|
||||
|
||||
@@ -334,6 +338,7 @@ private:
|
||||
int castleRightsMask[64];
|
||||
StateInfo startState;
|
||||
File initialKFile, initialKRFile, initialQRFile;
|
||||
int startPosPlyCounter;
|
||||
int threadID;
|
||||
StateInfo* st;
|
||||
|
||||
@@ -536,6 +541,11 @@ inline int Position::rule_50_counter() const {
|
||||
return st->rule50;
|
||||
}
|
||||
|
||||
inline int Position::startpos_ply_counter() const {
|
||||
|
||||
return startPosPlyCounter;
|
||||
}
|
||||
|
||||
inline bool Position::opposite_colored_bishops() const {
|
||||
|
||||
return piece_count(WHITE, BISHOP) == 1
|
||||
|
||||
Reference in New Issue
Block a user