mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 09:37:16 +08:00
Redefine enum CastleRight
To be aligned with PolyGlot book castle right definitions. This will be used by next patch. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -302,7 +302,7 @@ inline int Position::can_castle(CastleRight f) const {
|
||||
}
|
||||
|
||||
inline int Position::can_castle(Color c) const {
|
||||
return st->castleRights & ((WHITE_OO | WHITE_OOO) << c);
|
||||
return st->castleRights & ((WHITE_OO | WHITE_OOO) << (2 * c));
|
||||
}
|
||||
|
||||
inline bool Position::castle_impeded(Color c, CastlingSide s) const {
|
||||
|
||||
Reference in New Issue
Block a user