X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftypes.h;h=f5e30c7401bc82a14fd37d47bbc7b55082475a07;hp=a5502c2f5df2f1e143494231aa53b971f68cfb21;hb=2f1935078da225c90f7887ed8c345cc7baebcfcc;hpb=0fcda095df1caa860e8e3f3a714d5545ec9dc122 diff --git a/src/types.h b/src/types.h index a5502c2f..f5e30c74 100644 --- a/src/types.h +++ b/src/types.h @@ -77,9 +77,8 @@ typedef unsigned __int64 uint64_t; #define IS_64BIT #endif -// Automatic detection for use of bsfq asm-instruction under Windows. -// Works only in 64-bit mode. Does not work with MSVC. -#if defined(_WIN64) && defined(__INTEL_COMPILER) +// Automatic detection for use of bsfq asm-instruction under Windows +#if defined(_WIN64) #define USE_BSFQ #endif @@ -159,6 +158,9 @@ const bool CpuIs64Bit = false; typedef uint64_t Key; typedef uint64_t Bitboard; +const int PLY_MAX = 100; +const int PLY_MAX_PLUS_2 = PLY_MAX + 2; + enum ValueType { VALUE_TYPE_NONE = 0, VALUE_TYPE_UPPER = 1, @@ -173,6 +175,10 @@ enum Value { VALUE_MATE = 30000, VALUE_INFINITE = 30001, VALUE_NONE = 30002, + + VALUE_MATE_IN_PLY_MAX = VALUE_MATE - PLY_MAX, + VALUE_MATED_IN_PLY_MAX = -VALUE_MATE + PLY_MAX, + VALUE_ENSURE_INTEGER_SIZE_P = INT_MAX, VALUE_ENSURE_INTEGER_SIZE_N = INT_MIN }; @@ -457,4 +463,8 @@ inline bool square_is_ok(Square s) { return s >= SQ_A1 && s <= SQ_H8; } +inline Square pawn_push(Color c) { + return c == WHITE ? DELTA_N : DELTA_S; +} + #endif // !defined(TYPES_H_INCLUDED)