- // Enemy knights checks
- b = pos.attacks_from<KNIGHT>(ksq) & attackedBy[Them][KNIGHT];
- if (b & safe)
- kingDanger += KnightSafeCheck;
- else
- unsafeChecks |= b;
-
- // Unsafe or occupied checking squares will also be considered, as long as
- // the square is in the attacker's mobility area.
- unsafeChecks &= mobilityArea[Them];
-
- kingDanger += kingAttackersCount[Them] * kingAttackersWeight[Them]
- + 69 * kingAttacksCount[Them]
- + 185 * popcount(kingRing[Us] & weak)
- + 150 * popcount(pos.blockers_for_king(Us) | unsafeChecks)
- + tropism * tropism / 4
- - 873 * !pos.count<QUEEN>(Them)
- - 6 * mg_value(score) / 8
- + mg_value(mobility[Them] - mobility[Us])
- - 30;
-
- // Transform the kingDanger units into a Score, and subtract it from the evaluation
- if (kingDanger > 0)
- score -= make_score(kingDanger * kingDanger / 4096, kingDanger / 16);
- }
+ // Enemy knights checks
+ b = pos.attacks_from<KNIGHT>(ksq) & attackedBy[Them][KNIGHT];
+ if (b & safe)
+ kingDanger += KnightSafeCheck;
+ else
+ unsafeChecks |= b;
+
+ // Unsafe or occupied checking squares will also be considered, as long as
+ // the square is in the attacker's mobility area.
+ unsafeChecks &= mobilityArea[Them];
+
+ kingDanger += kingAttackersCount[Them] * kingAttackersWeight[Them]
+ + 69 * kingAttacksCount[Them]
+ + 185 * popcount(kingRing[Us] & weak)
+ + 150 * popcount(pos.blockers_for_king(Us) | unsafeChecks)
+ + tropism * tropism / 4
+ - 873 * !pos.count<QUEEN>(Them)
+ - 6 * mg_value(score) / 8
+ + mg_value(mobility[Them] - mobility[Us])
+ - 30;
+
+ // Transform the kingDanger units into a Score, and subtract it from the evaluation
+ if (kingDanger > 0)
+ score -= make_score(kingDanger * kingDanger / 4096, kingDanger / 16);