simplify opposite_colors

This commit is contained in:
protonspring
2018-12-08 10:57:25 -07:00
committed by Stéphane Nicolet
parent 5c2fbcd09b
commit fefc0c6789
2 changed files with 4 additions and 5 deletions

View File

@@ -135,6 +135,10 @@ constexpr bool more_than_one(Bitboard b) {
return b & (b - 1);
}
inline bool opposite_colors(Square s1, Square s2) {
return bool(DarkSquares & s1) != bool(DarkSquares & s2);
}
/// rank_bb() and file_bb() return a bitboard representing all the squares on
/// the given file or rank.