- const Score Doubled = S(18, 38);
-
- // Lever bonus by rank
- const Score Lever[RANK_NB] = {
- S( 0, 0), S( 0, 0), S(0, 0), S(0, 0),
- S(17, 16), S(33, 32), S(0, 0), S(0, 0)
- };
-
- // Weakness of our pawn shelter in front of the king by [distance from edge][rank].
- // RANK_1 = 0 is used for files where we have no pawns or our pawn is behind our king.
- const Value ShelterWeakness[][RANK_NB] = {
- { V(100), V(20), V(10), V(46), V(82), V( 86), V( 98) },
- { V(116), V( 4), V(28), V(87), V(94), V(108), V(104) },
- { V(109), V( 1), V(59), V(87), V(62), V( 91), V(116) },
- { V( 75), V(12), V(43), V(59), V(90), V( 84), V(112) }
+ constexpr Score Doubled = S(18, 38);
+
+ // Strength of pawn shelter for our king by [distance from edge][rank].
+ // RANK_1 = 0 is used for files where we have no pawn, or pawn is behind our king.
+ constexpr Value ShelterStrength[int(FILE_NB) / 2][RANK_NB] = {
+ { V( -9), V(64), V(77), V( 44), V( 4), V( -1), V(-11) },
+ { V(-15), V(83), V(51), V(-10), V( 1), V(-10), V(-28) },
+ { V(-18), V(84), V(27), V(-12), V(21), V( -7), V(-36) },
+ { V( 12), V(79), V(25), V( 19), V( 9), V( -6), V(-33) }