if (Pt == ROOK)
{
- // Bonus for aligning rook with with enemy pawns on the same rank/file
+ // Bonus for aligning rook with enemy pawns on the same rank/file
if (relative_rank(Us, s) >= RANK_5)
score += RookOnPawn * popcount(pos.pieces(Them, PAWN) & PseudoAttacks[ROOK][s]);
}
else if (pos.pieces(Us) & blockSq)
bonus += make_score(w + r * 2, w + r * 2);
- } // rr != 0
+ } // w != 0
// Scale down bonus for candidate passers which need more than one
// pawn push to become passed or have a pawn in front of them.
{
if (pos.opposite_bishops())
{
- // Endgame with opposite-colored bishops and no other pieces (ignoring pawns)
- // is almost a draw, in case of KBP vs KB, it is even more a draw.
+ // Endgame with opposite-colored bishops and no other pieces is almost a draw
if ( pos.non_pawn_material(WHITE) == BishopValueMg
&& pos.non_pawn_material(BLACK) == BishopValueMg)
- sf = more_than_one(pos.pieces(PAWN)) ? 31 : 9;
+ sf = 31;
// Endgame with opposite-colored bishops, but also other pieces. Still
// a bit drawish, but not as drawish as with only the two bishops.