#endif
#ifdef USE_POPCNT
-const bool HasPopCnt = true;
+constexpr bool HasPopCnt = true;
#else
-const bool HasPopCnt = false;
+constexpr bool HasPopCnt = false;
#endif
#ifdef USE_PEXT
-const bool HasPext = true;
+constexpr bool HasPext = true;
#else
-const bool HasPext = false;
+constexpr bool HasPext = false;
#endif
#ifdef IS_64BIT
-const bool Is64Bit = true;
+constexpr bool Is64Bit = true;
#else
-const bool Is64Bit = false;
+constexpr bool Is64Bit = false;
#endif
typedef uint64_t Key;
typedef uint64_t Bitboard;
-const int MAX_MOVES = 256;
-const int MAX_PLY = 128;
+constexpr int MAX_MOVES = 256;
+constexpr int MAX_PLY = 128;
/// A move needs 16 bits to be stored
///
KnightValueMg = 764, KnightValueEg = 848,
BishopValueMg = 826, BishopValueEg = 891,
RookValueMg = 1282, RookValueEg = 1373,
- QueenValueMg = 2526, QueenValueEg = 2646,
+ QueenValueMg = 2500, QueenValueEg = 2670,
MidgameLimit = 15258, EndgameLimit = 3915
};
};
-/// 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
-/// and the upper 16 bits are used to store the middlegame value. Take some
-/// care to avoid left-shifting a signed int to avoid undefined behavior.
+/// Score enum stores a middlegame and an endgame value in a single integer (enum).
+/// The least significant 16 bits are used to store the middlegame value and the
+/// upper 16 bits are used to store the endgame value. We have to take care to
+/// avoid left-shifting a signed int to avoid undefined behavior.
enum Score : int { SCORE_ZERO };
constexpr Score make_score(int mg, int eg) {