-/// forward_bb() takes a color and a square as input, and returns a bitboard
-/// representing all squares along the line in front of the square, from the
-/// point of view of the given color. Definition of the table is:
-/// ForwardBB[c][s] = in_front_bb(c, s) & file_bb(s)
+/// forward_ranks_bb() returns a bitboard representing all the squares on all 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 ForwardRanksBB[c][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:
+/// ForwardFileBB[c][s] = forward_ranks_bb(c, s) & file_bb(s)