-/// 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.
-enum Score : int { SCORE_ZERO };
+/// Score enum stores a middlegame and an endgame value in a single integer.
+/// The least significant 16 bits are used to store the endgame value and
+/// the upper 16 bits are used to store the middlegame value. The compiler
+/// is free to choose the enum type as long as it can store the data, so we
+/// ensure that Score is an integer type by assigning some big int values.
+enum Score {
+ SCORE_ZERO,
+ SCORE_ENSURE_INTEGER_SIZE_P = INT_MAX,
+ SCORE_ENSURE_INTEGER_SIZE_N = INT_MIN
+};