mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08:00
Move pawn_attacks_bb() helper to bitboard.h
No functional change.
This commit is contained in:
@@ -115,7 +115,6 @@ public:
|
||||
Bitboard attacks_from(PieceType pt, Square s) const;
|
||||
template<PieceType> Bitboard attacks_from(Square s) const;
|
||||
template<PieceType> Bitboard attacks_from(Square s, Color c) const;
|
||||
template<Color> Bitboard pawn_attacks(Bitboard b) const;
|
||||
Bitboard slider_blockers(Bitboard sliders, Square s, Bitboard& pinners) const;
|
||||
|
||||
// Properties of moves
|
||||
@@ -289,12 +288,6 @@ inline Bitboard Position::attacks_from(PieceType pt, Square s) const {
|
||||
return attacks_bb(pt, s, byTypeBB[ALL_PIECES]);
|
||||
}
|
||||
|
||||
template<Color c>
|
||||
inline Bitboard Position::pawn_attacks(Bitboard b) const {
|
||||
return c == WHITE ? shift<NORTH_WEST>(b) | shift<NORTH_EAST>(b)
|
||||
: shift<SOUTH_WEST>(b) | shift<SOUTH_EAST>(b);
|
||||
}
|
||||
|
||||
inline Bitboard Position::attackers_to(Square s) const {
|
||||
return attackers_to(s, byTypeBB[ALL_PIECES]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user