mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
Introduce make_castle_right() helper
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -347,6 +347,10 @@ inline Piece make_piece(Color c, PieceType pt) {
|
||||
return Piece((c << 3) | pt);
|
||||
}
|
||||
|
||||
inline CastleRight make_castle_right(Color c, CastlingSide s) {
|
||||
return CastleRight((s == KING_SIDE ? WHITE_OO : WHITE_OOO) << c);
|
||||
}
|
||||
|
||||
inline PieceType type_of(Piece p) {
|
||||
return PieceType(p & 7);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user