- return D == NORTH ? b << 8 : D == SOUTH ? b >> 8
- : D == EAST ? (b & ~FileHBB) << 1 : D == WEST ? (b & ~FileABB) >> 1
- : D == NORTH_EAST ? (b & ~FileHBB) << 9 : D == NORTH_WEST ? (b & ~FileABB) << 7
- : D == SOUTH_EAST ? (b & ~FileHBB) >> 7 : D == SOUTH_WEST ? (b & ~FileABB) >> 9
- : 0;
-}
-
-
-/// pawn_attacks_bb() returns the pawn attacks for the given color from the
-/// squares in the given bitboard.
-
+ return D == NORTH ? b << 8
+ : D == SOUTH ? b >> 8
+ : D == NORTH + NORTH ? b << 16
+ : D == SOUTH + SOUTH ? b >> 16
+ : D == EAST ? (b & ~FileHBB) << 1
+ : D == WEST ? (b & ~FileABB) >> 1
+ : D == NORTH_EAST ? (b & ~FileHBB) << 9
+ : D == NORTH_WEST ? (b & ~FileABB) << 7
+ : D == SOUTH_EAST ? (b & ~FileHBB) >> 7
+ : D == SOUTH_WEST ? (b & ~FileABB) >> 9
+ : 0;
+}
+
+
+// Returns the squares attacked by pawns of the given color
+// from the squares in the given bitboard.