- // ThreatBonus[][] contains bonus according to which piece type
- // attacks which one.
- const Score ThreatBonus[8][8] = {
- #define Z Score(0, 0)
- { Z, Z, Z, Z, Z, Z, Z, Z }, // not used
- { Z, S(18,37), Z, S(37,47), S(55,97), S(55,97), Z, Z }, // KNIGHT attacks
- { Z, S(18,37), S(37,47), Z, S(55,97), S(55,97), Z, Z }, // BISHOP attacks
- { Z, S( 9,27), S(27,47), S(27,47), Z, S(37,47), Z, Z }, // ROOK attacks
- { Z, S(27,37), S(27,37), S(27,37), S(27,37), Z, Z, Z }, // QUEEN attacks
- { Z, Z, Z, Z, Z, Z, Z, Z }, // not used
- { Z, Z, Z, Z, Z, Z, Z, Z }, // not used
- { Z, Z, Z, Z, Z, Z, Z, Z } // not used
- #undef Z
- };
-
- // ThreatedByPawnPenalty[] contains a penalty according to which piece
- // type is attacked by an enemy pawn.
- const Value MidgameThreatedByPawnPenalty[8] = {
- V(0), V(0), V(56), V(56), V(76), V(86), V(0), V(0)
- };
-
- const Value EndgameThreatedByPawnPenalty[8] = {
- V(0), V(0), V(70), V(70), V(99), V(118), V(0), V(0)
- };
-