Small simplification in castling rights

There is no need for a special struct with a static member
to generate castling rights.

No functional change.
This commit is contained in:
mstembera
2018-10-14 12:50:31 -07:00
committed by Marco Costalba
parent 738a6dfd4c
commit 542a2b39ed
3 changed files with 13 additions and 18 deletions

View File

@@ -145,12 +145,6 @@ enum CastlingRight {
CASTLING_RIGHT_NB = 16
};
template<Color C, CastlingSide S> struct MakeCastling {
static constexpr CastlingRight
right = C == WHITE ? S == QUEEN_SIDE ? WHITE_OOO : WHITE_OO
: S == QUEEN_SIDE ? BLACK_OOO : BLACK_OO;
};
enum Phase {
PHASE_ENDGAME,
PHASE_MIDGAME = 128,