-/// forward_ranks_bb() returns a bitboard representing the squares on the ranks
-/// in front of the given one, from the point of view of the given color. For instance,
-/// forward_ranks_bb(BLACK, SQ_D3) will return the 16 squares on ranks 1 and 2.
-
-inline Bitboard forward_ranks_bb(Color c, Square s) {
- return c == WHITE ? ~Rank1BB << 8 * (rank_of(s) - RANK_1)
- : ~Rank8BB >> 8 * (RANK_8 - rank_of(s));
-}
-
-
-/// forward_file_bb() returns a bitboard representing all the squares along the
-/// line in front of the given one, from the point of view of the given color.
-
-inline Bitboard forward_file_bb(Color c, Square s) {
- return forward_ranks_bb(c, s) & file_bb(s);
-}
-
-
-/// pawn_attack_span() returns a bitboard representing all the squares that can
-/// be attacked by a pawn of the given color when it moves along its file,
-/// starting from the given square.
-
-inline Bitboard pawn_attack_span(Color c, Square s) {
- return forward_ranks_bb(c, s) & adjacent_files_bb(file_of(s));
-}
+/// between_bb(s1, s2) returns a bitboard representing the squares in the semi-open
+/// segment between the squares s1 and s2 (excluding s1 but including s2). If the
+/// given squares are not on a same file/rank/diagonal, it returns s2. For instance,
+/// between_bb(SQ_C4, SQ_F7) will return a bitboard with squares D5, E6 and F7, but
+/// between_bb(SQ_E6, SQ_F8) will return a bitboard with the square F8. This trick
+/// allows to generate non-king evasion moves faster: the defending piece must either
+/// interpose itself to cover the check or capture the checking piece.