- return Piece((int(c) << 3) | int(pt));
-}
-
-inline PieceType type_of_piece(Piece p) {
- return PieceType(int(p) & 7);
-}
-
-inline Color color_of_piece(Piece p) {
- return Color(int(p) >> 3);
-}
-
-inline Color opposite_color(Color c) {
- return Color(int(c) ^ 1);