- return Color(int(c) ^ 1);
-}
-
-inline bool color_is_ok(Color c) {
- return c == WHITE || c == BLACK;
-}
-
-inline bool piece_type_is_ok(PieceType pt) {
- return pt >= PAWN && pt <= KING;
-}
-
-inline bool piece_is_ok(Piece p) {
- return piece_type_is_ok(type_of_piece(p)) && color_is_ok(color_of_piece(p));