const int MaxSlope = 30;
const int Peak = 1280;
- for (int t = 0, i = 1; i < 100; i++)
+ for (int t = 0, i = 1; i < 100; ++i)
{
t = std::min(Peak, std::min(int(0.4 * i * i), t + MaxSlope));
Square blockSq = s + pawn_push(Us);
// Adjust bonus based on kings proximity
- ebonus += Value(square_distance(pos.king_square(Them), blockSq) * 5 * rr);
- ebonus -= Value(square_distance(pos.king_square(Us), blockSq) * 2 * rr);
+ ebonus += Value(square_distance(pos.king_square(Them), blockSq) * 5 * rr)
+ - Value(square_distance(pos.king_square(Us ), blockSq) * 2 * rr);
// If blockSq is not the queening square then consider also a second push
if (relative_rank(Us, blockSq) != RANK_8)