Retire SquaresByColorBB[] and enum SquareColor

Use same_color_squares() instead.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2011-12-28 10:49:55 +01:00
parent a695ed65a8
commit ad4739a6d4
5 changed files with 11 additions and 15 deletions

View File

@@ -283,10 +283,6 @@ enum Rank {
RANK_1, RANK_2, RANK_3, RANK_4, RANK_5, RANK_6, RANK_7, RANK_8
};
enum SquareColor {
DARK, LIGHT
};
enum ScaleFactor {
SCALE_FACTOR_DRAW = 0,
SCALE_FACTOR_NORMAL = 64,
@@ -452,10 +448,6 @@ inline Rank relative_rank(Color c, Square s) {
return relative_rank(c, rank_of(s));
}
inline SquareColor color_of(Square s) {
return SquareColor(int(rank_of(s) + s) & 1);
}
inline bool opposite_colors(Square s1, Square s2) {
int s = s1 ^ s2;
return ((s >> 3) ^ s) & 1;