There is no reason for that since tr cannot become negative.
Spotted by Ralph Stoesser.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
assert(pos.pawn_is_passed(Us, s));
int r = int(relative_rank(Us, s) - RANK_2);
assert(pos.pawn_is_passed(Us, s));
int r = int(relative_rank(Us, s) - RANK_2);
- int tr = Max(0, r * (r - 1));
// Base bonus based on rank
Value mbonus = Value(20 * tr);
// Base bonus based on rank
Value mbonus = Value(20 * tr);