kingRing[Us] |= shift<EAST>(kingRing[Us]);
kingAttackersCount[Them] = popcount(kingRing[Us] & pe->pawn_attacks(Them));
+ kingRing[Us] &= ~double_pawn_attacks_bb<Us>(pos.pieces(Us, PAWN));
kingAttacksCount[Them] = kingAttackersWeight[Them] = 0;
}
}
attackedBy[Us][Pt] |= b;
attackedBy[Us][ALL_PIECES] |= b;
- if (b & kingRing[Them] & ~double_pawn_attacks_bb<Them>(pos.pieces(Them, PAWN)))
+ if (b & kingRing[Them])
{
kingAttackersCount[Us]++;
kingAttackersWeight[Us] += KingAttackWeights[Pt];
// Bonus for restricting their piece moves
restricted = attackedBy[Them][ALL_PIECES]
- & ~attackedBy[Them][PAWN]
- & ~attackedBy2[Them]
+ & ~stronglyProtected
& attackedBy[Us][ALL_PIECES];
score += RestrictedPiece * popcount(restricted);