- // Don't allow pinned pieces to attack as long all pinners (this includes also
- // potential ones) are on their original square. When a pinner moves to the
- // exchange-square or get captured on it, we fall back to standard SEE behaviour.
- if ( (stmAttackers & pinned_pieces(stm))
- && (st->pinnersForKing[stm] & occupied) == st->pinnersForKing[stm])
- stmAttackers &= ~pinned_pieces(stm);
+ // Don't allow pinned pieces to attack pieces except the king as long all
+ // pinners are on their original square.
+ if (!(st->pinnersForKing[stm] & ~occupied))
+ stmAttackers &= ~st->blockersForKing[stm];