Return the bitboard with the pawn attacks for both colors
so to be aligned to the meaning of the others piece_attacks<Piece>
templates.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
else if ( Piece != KING
&& !Slider
- && bit_is_set(piece_attacks<Piece>(ksq), to))
+ && bit_is_set(Piece == PAWN ? pawn_attacks(opposite_color(sideToMove), ksq) : piece_attacks<Piece>(ksq), to))
set_bit(pCheckersBB, to);
// Discovery checks
template<>
inline Bitboard Position::piece_attacks<PAWN>(Square s) const {
- return StepAttackBB[piece_of_color_and_type(opposite_color(sideToMove), PAWN)][s];
+ return StepAttackBB[WP][s] | StepAttackBB[BP][s];
}
template<>