mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Move kingSquare[] array to StateInfo
This avoids to reverting back when undoing the move. No functional change. No performance change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -89,7 +89,7 @@ enum Phase {
|
||||
struct StateInfo {
|
||||
Key key, pawnKey, materialKey;
|
||||
int castleRights, rule50;
|
||||
Square epSquare;
|
||||
Square kingSquare[2], epSquare;
|
||||
Value mgValue, egValue;
|
||||
Value npMaterial[2];
|
||||
|
||||
@@ -326,7 +326,6 @@ private:
|
||||
int index[64]; // [square]
|
||||
|
||||
// Other info
|
||||
Square kingSquare[2];
|
||||
Color sideToMove;
|
||||
int gamePly;
|
||||
Key history[MaxGameLength];
|
||||
@@ -423,7 +422,7 @@ inline Square Position::ep_square() const {
|
||||
}
|
||||
|
||||
inline Square Position::king_square(Color c) const {
|
||||
return kingSquare[c];
|
||||
return st->kingSquare[c];
|
||||
}
|
||||
|
||||
inline bool Position::can_castle_kingside(Color side) const {
|
||||
|
||||
Reference in New Issue
Block a user