mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 09:37:16 +08:00
Fix semantic of piece_attacks<PAWN>
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>
This commit is contained in:
@@ -457,7 +457,7 @@ inline Bitboard Position::piece_attacks(Square s) const {
|
||||
|
||||
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<>
|
||||
|
||||
Reference in New Issue
Block a user