File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,10 @@ constexpr bool more_than_one(Bitboard b) {
135135 return b & (b - 1 );
136136}
137137
138+ inline bool opposite_colors (Square s1, Square s2) {
139+ return bool (DarkSquares & s1) != bool (DarkSquares & s2);
140+ }
141+
138142// / rank_bb() and file_bb() return a bitboard representing all the squares on
139143// / the given file or rank.
140144
Original file line number Diff line number Diff line change @@ -413,11 +413,6 @@ constexpr Rank relative_rank(Color c, Square s) {
413413 return relative_rank (c, rank_of (s));
414414}
415415
416- inline bool opposite_colors (Square s1, Square s2) {
417- int s = int (s1) ^ int (s2);
418- return ((s >> 3 ) ^ s) & 1 ;
419- }
420-
421416constexpr Direction pawn_push (Color c) {
422417 return c == WHITE ? NORTH : SOUTH;
423418}
You can’t perform that action at this time.
0 commit comments