X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftypes.h;h=785d98986ea39e1cbcab7bbb8e65562ace65efe7;hp=eea31e3b6f229cf8cc72b1abcdb8c363fce88216;hb=9edc7d6958fd616daecb0ab9ae2aa92042b3d34a;hpb=96d3b1c92b8db7d2238fc4993a4f3da49f04d614 diff --git a/src/types.h b/src/types.h index eea31e3b..785d9898 100644 --- a/src/types.h +++ b/src/types.h @@ -35,6 +35,7 @@ /// | only in 64-bit mode. For compiling requires hardware with /// | popcnt support. +#include #include #include #include @@ -130,12 +131,6 @@ enum MoveType { CASTLE = 3 << 14 }; -enum CheckType { - NO_CHECK, - DIRECT_CHECK, - DISCO_CHECK -}; - enum CastleRight { // Defined as in PolyGlot book hash key CASTLES_NONE = 0, WHITE_OO = 1, @@ -169,7 +164,7 @@ enum Bound { BOUND_NONE = 0, BOUND_UPPER = 1, BOUND_LOWER = 2, - BOUND_EXACT = BOUND_UPPER | BOUND_LOWER + BOUND_EXACT = BOUND_UPPER | BOUND_LOWER | 4 }; enum Value { @@ -397,7 +392,8 @@ inline PieceType type_of(Piece p) { } inline Color color_of(Piece p) { - return p == NO_PIECE ? NO_COLOR : Color(p >> 3); + assert(p != NO_PIECE); + return Color(p >> 3); } inline bool is_ok(Square s) {