A chess piece type. More...
#include <Type.h>
Public Member Functions | |
Constructors | |
Type (void) | |
Construct an uninitialized Type. | |
Type (Type const& type) | |
Copy-constructor. | |
Type (TypeData type) | |
Construct a Type from a constant. | |
Assignment operators | |
Type& | operator= (Type const& type) |
Assign from another Type. | |
Type& | operator= (TypeData type) |
Assign from a constant. | |
Accessors | |
bool | is_a_slider (void) const |
Returns TRUE if the type is a bishop, rook or queen. | |
bool | is_a_rookmover (void) const |
Returns TRUE if the type is a rook or queen. | |
bool | is_a_bishopmover (void) const |
Returns TRUE if the type is a bishop or queen. | |
uint8_t | operator() (void) const |
Return the underlaying integral value. | |
Friends | |
class | Code |
Comparison operators | |
bool | operator== (Type const& t1, Type const& t2) |
bool | operator== (Type const& t1, TypeData t2) |
bool | operator== (TypeData t1, Type const& t2) |
bool | operator!= (Type const& t1, Type const& t2) |
bool | operator!= (Type const& t1, TypeData t2) |
bool | operator!= (TypeData t1, Type const& t2) |
Additional Inherited Members | |
Protected Attributes inherited from cwchess::TypeData | |
uint8_t | M_bits |
00000STT, where STT is the type. If S == 1 then the piece is a slider. | |
A chess piece type.
This class represents a chess piece type.
The class Code is a friend of this class.