Introduce make_castle_right() helper

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2012-04-08 17:07:56 +01:00
parent e56342ed00
commit d549497144
4 changed files with 12 additions and 12 deletions

View File

@@ -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);
}