X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftypes.h;h=543b38a84752faa6ab3844504e8ecd48d2aee381;hp=f921f9e105cb66cd503d81b87635e538e30dda93;hb=bc83515c9e821016d2113298ef988e99ceced1af;hpb=880e3cd7c82c82776e85042c849e884811378e21 diff --git a/src/types.h b/src/types.h index f921f9e1..543b38a8 100644 --- a/src/types.h +++ b/src/types.h @@ -100,9 +100,8 @@ const bool Is64Bit = false; typedef uint64_t Key; typedef uint64_t Bitboard; -const int MAX_MOVES = 256; -const int MAX_PLY = 120; -const int MAX_PLY_PLUS_6 = MAX_PLY + 6; +const int MAX_MOVES = 256; +const int MAX_PLY = 128; /// A move needs 16 bits to be stored /// @@ -211,14 +210,14 @@ enum Piece { enum Depth { - ONE_PLY = 2, + ONE_PLY = 1, - DEPTH_ZERO = 0 * ONE_PLY, - DEPTH_QS_CHECKS = 0 * ONE_PLY, - DEPTH_QS_NO_CHECKS = -1 * ONE_PLY, - DEPTH_QS_RECAPTURES = -5 * ONE_PLY, + DEPTH_ZERO = 0, + DEPTH_QS_CHECKS = 0, + DEPTH_QS_NO_CHECKS = -1, + DEPTH_QS_RECAPTURES = -5, - DEPTH_NONE = -6 * ONE_PLY + DEPTH_NONE = -6 }; enum Square { @@ -255,6 +254,7 @@ enum Rank { RANK_1, RANK_2, RANK_3, RANK_4, RANK_5, RANK_6, RANK_7, RANK_8, RANK_NB }; +template inline T dist(T x, T y) { return x < y ? y - x : x - y; } /// The Score enum stores a middlegame and an endgame value in a single integer /// (enum). The least significant 16 bits are used to store the endgame value