mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user