- // Pawn blocking evasions (possible only if the checking piece is a slider)
- if (sliderAttacks)
- mlist = generate_piece_evasions<PAWN>(pos, mlist, us, target, pinned);
-
- // Add the checking piece to the target squares
- target |= checkers;
-
- // Captures and blocking evasions for the other pieces
- mlist = generate_piece_evasions<KNIGHT>(pos, mlist, us, target, pinned);
- mlist = generate_piece_evasions<BISHOP>(pos, mlist, us, target, pinned);
- mlist = generate_piece_evasions<ROOK>(pos, mlist, us, target, pinned);
- mlist = generate_piece_evasions<QUEEN>(pos, mlist, us, target, pinned);
-
- // Finally, the special case of en passant captures. An en passant
- // capture can only be a check evasion if the check is not a discovered
- // check. If pos.ep_square() is set, the last move made must have been
- // a double pawn push. If, furthermore, the checking piece is a pawn,
- // an en passant check evasion may be possible.
- if (pos.ep_square() != SQ_NONE && (checkers & pos.pieces(PAWN, them)))
- {
- to = pos.ep_square();
- b1 = pos.attacks_from<PAWN>(to, them) & pos.pieces(PAWN, us);