if (r > RANK_3)
{
- int w = (r-2) * (r-2) + 2;
+ int w = 5 * r - 13;
Square blockSq = s + Up;
// Adjust bonus based on the king's proximity
!(unsafeSquares & blockSq) ? 9 :
0 ;
- // Assign a larger bonus if the block square is defended.
+ // Assign a larger bonus if the block square is defended
if (defendedSquares & blockSq)
k += 5;