X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftypes.h;h=417f4815755564b56d599a2ba25ad27392c64bea;hp=4d113e1b9edfe703c44453abafa59b47a24fc7ff;hb=ae979416282d43793a49944ed007119673853555;hpb=d2971f3fca929d9085ed17b71aa4ec8e96499d99 diff --git a/src/types.h b/src/types.h index 4d113e1b..417f4815 100644 --- a/src/types.h +++ b/src/types.h @@ -76,7 +76,7 @@ # include // Header for _pext_u64() intrinsic # define pext(b, m) _pext_u64(b, m) #else -# define pext(b, m) (0) +# define pext(b, m) 0 #endif #ifdef USE_POPCNT @@ -185,9 +185,9 @@ enum Value : int { PawnValueMg = 188, PawnValueEg = 248, KnightValueMg = 753, KnightValueEg = 832, - BishopValueMg = 826, BishopValueEg = 897, + BishopValueMg = 814, BishopValueEg = 890, RookValueMg = 1285, RookValueEg = 1371, - QueenValueMg = 2513, QueenValueEg = 2650, + QueenValueMg = 2513, QueenValueEg = 2648, MidgameLimit = 15258, EndgameLimit = 3915 }; @@ -205,8 +205,6 @@ enum Piece { PIECE_NB = 16 }; -const Piece Pieces[] = { W_PAWN, W_KNIGHT, W_BISHOP, W_ROOK, W_QUEEN, W_KING, - B_PAWN, B_KNIGHT, B_BISHOP, B_ROOK, B_QUEEN, B_KING }; extern Value PieceValue[PHASE_NB][PIECE_NB]; enum Depth : int { @@ -239,8 +237,8 @@ enum Square { NORTH = 8, EAST = 1, - SOUTH = -8, - WEST = -1, + SOUTH = -NORTH, + WEST = -EAST, NORTH_EAST = NORTH + EAST, SOUTH_EAST = SOUTH + EAST, @@ -331,6 +329,7 @@ inline Score operator/(Score s, int i) { /// Multiplication of a Score by an integer. We check for overflow in debug mode. inline Score operator*(Score s, int i) { + Score result = Score(int(s) * i); assert(eg_value(result) == (i * eg_value(s)));