mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 18:17:02 +08:00
Use operator~ to flip colors and squares
More natural and nicer. Idea from Critter. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -82,7 +82,7 @@ struct EndgameBase {
|
||||
template<EndgameType E, typename T = typename eg_family<E>::type>
|
||||
struct Endgame : public EndgameBase<T> {
|
||||
|
||||
explicit Endgame(Color c) : strongerSide(c), weakerSide(flip(c)) {}
|
||||
explicit Endgame(Color c) : strongerSide(c), weakerSide(~c) {}
|
||||
Color color() const { return strongerSide; }
|
||||
T operator()(const Position&) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user