43 uint8_t
const fl_pawn_mask = { 120 };
Flags(FlagsData flags)
Construct a Flags object from a constant.
A namespace for all chess related objects that are not related to the GUI.
The POD base type of class Flags.
BitBoardData const f1
The square f1.
FlagsData const fl_pawn_is_not_blocked
A constant representing the flag& #39;pawn is not blocked'.
Flags representing the state of a piece on the chessboard.
uint8_t operator()(void) const
Return the underlaying integral value.
uint8_t M_bits
0TKNQ000, T=can move two squares, K=can take king side, N=is not blocked, Q=can take queen side...
FlagsData const fl_pawn_can_take_king_side
A constant representing the flag& #39;pawn can take king side'.
void reset(FlagsData flags)
Clear the bits that are set in flags.
Flags(void)
Construct an uninitialized Flags object.
BitBoardData operator|(BitBoardData x, BitBoardData y)
Calculate the union of two bit board constants.
BitBoardData operator&(BitBoardData x, BitBoardData y)
Calculate the intersection of two bit board constants.
Flags & operator&=(Flags const& flags)
Reset all bits that are not set in flags.
Flags(Flags const& flags)
Copy-constructor.
Flags & operator=(Flags const& flags)
Assign from another Flags object.
Flags & operator|=(FlagsData flags)
Set all bits that are set in flags.
Flags & operator^=(Flags const& flags)
Toggle all bits that are set in flags.
Flags & operator&=(FlagsData flags)
Reset all bits that are not set in flags.
Flags & operator^=(FlagsData flags)
Toggle all bits that are set in flags.
Flags & operator=(FlagsData flags)
Assign from a constant.
Flags & operator|=(Flags const& flags)
Set all bits that are set in flags.
FlagsData const fl_pawn_can_move_two_squares
A constant representing the flag& #39;pawn can move two squares'.
BitBoardData const f2
The square f2.
void set_can_move_two_squares_if_not_blocked(void)
Set the fl_pawn_can_move_two_squares bit iff fl_pawn_is_not_blocked bit is already set...
BitBoardData operator^(BitBoardData x, BitBoardData y)
Calculate the union minus the intersection of two bit board constants.
FlagsData const fl_pawn_can_take_queen_side
A constant representing the flag& #39;pawn can take queen side'.
void clear(void)
Set all flags to 0.