- return piece_count(WHITE, BISHOP) == 1
- && piece_count(BLACK, BISHOP) == 1
- && opposite_color_squares(piece_list(WHITE, BISHOP)[0], piece_list(BLACK, BISHOP)[0]);
+ return pieceCount[WHITE][BISHOP] == 1
+ && pieceCount[BLACK][BISHOP] == 1
+ && opposite_colors(pieceList[WHITE][BISHOP][0], pieceList[BLACK][BISHOP][0]);
+}
+
+inline bool Position::both_color_bishops(Color c) const {
+ // Assumes that there are only two bishops
+ return pieceCount[c][BISHOP] >= 2 &&
+ opposite_colors(pieceList[c][BISHOP][0], pieceList[c][BISHOP][1]);