-/// pawn_double_attacks_bb() returns the squares doubly attacked by pawns of the
-/// given color from the squares in the given bitboard.
-
-template<Color C>
-constexpr Bitboard pawn_double_attacks_bb(Bitboard b) {
- return C == WHITE ? shift<NORTH_WEST>(b) & shift<NORTH_EAST>(b)
- : shift<SOUTH_WEST>(b) & shift<SOUTH_EAST>(b);
-}
-
-
-/// adjacent_files_bb() returns a bitboard representing all the squares on the
-/// adjacent files of the given one.
-
-inline Bitboard adjacent_files_bb(Square s) {
- return shift<EAST>(file_bb(s)) | shift<WEST>(file_bb(s));
-}
-
-
-/// between_bb() returns squares that are linearly between the given squares
-/// If the given squares are not on a same file/rank/diagonal, return 0.
-
-inline Bitboard between_bb(Square s1, Square s2) {
- return LineBB[s1][s2] & ( (AllSquares << (s1 + (s1 < s2)))
- ^(AllSquares << (s2 + !(s1 < s2))));