X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitboard.h;h=e1c31dd7c5fd1525dc61712de06fa55cf760ac7b;hp=37585bb19b18e8e25feb54120429b3177caa6da6;hb=2d0af36753a2f1acdf43b4e1d30d56ad8effc429;hpb=090e49547ecaba8c9ec696d75f2fca3020bb058a diff --git a/src/bitboard.h b/src/bitboard.h index 37585bb1..e1c31dd7 100644 --- a/src/bitboard.h +++ b/src/bitboard.h @@ -65,7 +65,6 @@ extern int SquareDistance[SQUARE_NB][SQUARE_NB]; extern Bitboard SquareBB[SQUARE_NB]; extern Bitboard FileBB[FILE_NB]; extern Bitboard RankBB[RANK_NB]; -extern Bitboard AdjacentFilesBB[FILE_NB]; extern Bitboard ForwardRanksBB[COLOR_NB][RANK_NB]; extern Bitboard BetweenBB[SQUARE_NB][SQUARE_NB]; extern Bitboard LineBB[SQUARE_NB][SQUARE_NB]; @@ -136,7 +135,7 @@ constexpr bool more_than_one(Bitboard b) { } inline bool opposite_colors(Square s1, Square s2) { - return (bool(DarkSquares & s1) != bool(DarkSquares & s2)); + return bool(DarkSquares & s1) != bool(DarkSquares & s2); } /// rank_bb() and file_bb() return a bitboard representing all the squares on @@ -195,7 +194,7 @@ constexpr Bitboard double_pawn_attacks_bb(Bitboard b) { /// adjacent files of the given one. inline Bitboard adjacent_files_bb(File f) { - return AdjacentFilesBB[f]; + return shift(FileBB[f]) | shift(FileBB[f]); }