]> git.sesse.net Git - stockfish/blobdiff - src/bitboard.h
add paren.
[stockfish] / src / bitboard.h
index c6dbc647b093dfe1c8d5d425554a76161138adeb..37585bb19b18e8e25feb54120429b3177caa6da6 100644 (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.