mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08:00
Use ply counter in Position object
And avoid a redundant one passed as argument in search calls. Also renamed gamePly in ply to better clarify this is used as search ply and is set to zero at the beginning of the search. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -100,7 +100,7 @@ enum Phase {
|
||||
|
||||
struct StateInfo {
|
||||
Key pawnKey, materialKey;
|
||||
int castleRights, rule50, gamePly, pliesFromNull;
|
||||
int castleRights, rule50, ply, pliesFromNull;
|
||||
Square epSquare;
|
||||
Score value;
|
||||
Value npMaterial[2];
|
||||
@@ -273,7 +273,7 @@ public:
|
||||
|
||||
// Game ply information
|
||||
int ply() const;
|
||||
void reset_game_ply();
|
||||
void reset_ply();
|
||||
|
||||
// Position consistency check, for debugging
|
||||
bool is_ok(int* failedStep = NULL) const;
|
||||
@@ -558,7 +558,7 @@ inline PieceType Position::captured_piece() const {
|
||||
}
|
||||
|
||||
inline int Position::ply() const {
|
||||
return st->gamePly;
|
||||
return st->ply;
|
||||
}
|
||||
|
||||
#endif // !defined(POSITION_H_INCLUDED)
|
||||
|
||||
Reference in New Issue
Block a user