struct StateInfo {
Key pawnKey, materialKey;
- int castleRights, rule50, pliesFromNull;
+ int castleRights, rule50, gamePly, pliesFromNull;
Square epSquare;
Score value;
Value npMaterial[2];
bool opposite_colored_bishops() const;
bool has_pawn_on_7th(Color c) const;
- // Reset the gamePly variable to 0
+ // Game ply information
+ int ply() const;
void reset_game_ply();
// Position consistency check, for debugging
// Other info
Color sideToMove;
- int gamePly;
Key history[MaxGameLength];
int castleRightsMask[64];
StateInfo startState;
return st->capture;
}
+inline int Position::ply() const {
+ return st->gamePly;
+}
+
#endif // !defined(POSITION_H_INCLUDED)