+/// adjacent files of a given square.
+
+constexpr Bitboard adjacent_files_bb(Square s) {
+ return shift<EAST>(file_bb(s)) | shift<WEST>(file_bb(s));
+}
+
+
+/// line_bb() returns a bitboard representing an entire line (from board edge
+/// to board edge) that intersects the two given squares. If the given squares
+/// are not on a same file/rank/diagonal, the function returns 0. For instance,
+/// line_bb(SQ_C4, SQ_F7) will return a bitboard with the A2-G8 diagonal.
+
+inline Bitboard line_bb(Square s1, Square s2) {
+
+ assert(is_ok(s1) && is_ok(s2));