]> git.sesse.net Git - stockfish/blobdiff - src/bitboard.h
Retire in_front_bb(Color c, Square s) overload
[stockfish] / src / bitboard.h
index 06adbfe3850512902633fe3b514dff664863bb90..a133c65bef28b0ef3e507a8bf7f93d4990b7e23e 100644 (file)
@@ -53,14 +53,13 @@ extern Bitboard SquareBB[SQUARE_NB];
 extern Bitboard FileBB[FILE_NB];
 extern Bitboard RankBB[RANK_NB];
 extern Bitboard AdjacentFilesBB[FILE_NB];
-extern Bitboard ThisAndAdjacentFilesBB[FILE_NB];
 extern Bitboard InFrontBB[COLOR_NB][RANK_NB];
 extern Bitboard StepAttacksBB[PIECE_NB][SQUARE_NB];
 extern Bitboard BetweenBB[SQUARE_NB][SQUARE_NB];
 extern Bitboard DistanceRingsBB[SQUARE_NB][8];
 extern Bitboard ForwardBB[COLOR_NB][SQUARE_NB];
 extern Bitboard PassedPawnMask[COLOR_NB][SQUARE_NB];
-extern Bitboard AttackSpanMask[COLOR_NB][SQUARE_NB];
+extern Bitboard PawnAttackSpan[COLOR_NB][SQUARE_NB];
 extern Bitboard PseudoAttacks[PIECE_TYPE_NB][SQUARE_NB];
 
 const Bitboard BlackSquares = 0xAA55AA55AA55AA55ULL;
@@ -136,28 +135,15 @@ inline Bitboard adjacent_files_bb(File f) {
 }
 
 
-/// this_and_adjacent_files_bb takes a file as input and returns a bitboard
-/// representing all squares on the given and adjacent files.
-
-inline Bitboard this_and_adjacent_files_bb(File f) {
-  return ThisAndAdjacentFilesBB[f];
-}
-
-
-/// in_front_bb() takes a color and a rank or square as input, and returns a
-/// bitboard representing all the squares on all ranks in front of the rank
-/// (or square), from the given color's point of view.  For instance,
-/// in_front_bb(WHITE, RANK_5) will give all squares on ranks 6, 7 and 8, while
-/// in_front_bb(BLACK, SQ_D3) will give all squares on ranks 1 and 2.
+/// in_front_bb() takes a color and a rank as input, and returns a bitboard
+/// representing all the squares on all ranks in front of the rank, from the
+/// given color's point of view. For instance, in_front_bb(BLACK, RANK_3) will
+/// give all squares on ranks 1 and 2.
 
 inline Bitboard in_front_bb(Color c, Rank r) {
   return InFrontBB[c][r];
 }
 
-inline Bitboard in_front_bb(Color c, Square s) {
-  return InFrontBB[c][rank_of(s)];
-}
-
 
 /// between_bb returns a bitboard representing all squares between two squares.
 /// For instance, between_bb(SQ_C4, SQ_F7) returns a bitboard with the bits for
@@ -194,8 +180,8 @@ inline Bitboard passed_pawn_mask(Color c, Square s) {
 /// when it moves along its file starting from the given square. Definition is:
 /// AttackSpanMask[c][s] = in_front_bb(c, s) & adjacent_files_bb(s);
 
-inline Bitboard attack_span_mask(Color c, Square s) {
-  return AttackSpanMask[c][s];
+inline Bitboard pawn_attack_span(Color c, Square s) {
+  return PawnAttackSpan[c][s];
 }