84 : m_data(type | (
Side::NoSide << 10))
89 : m_data(type | (side << 10))
98 return m_data == other.m_data;
103 return m_data != other.m_data;
108 return m_data < other.m_data;
113 return m_data > other.m_data;
138 return m_data & 0x3FF;
148 m_data =
type | (m_data & 0xC00);
static const int NoPiece
Definition: piece.h:43
bool operator==(const Piece &other) const
Definition: piece.h:96
Piece(int type=NoPiece)
Definition: piece.h:83
bool isWall() const
Definition: piece.h:126
bool isEmpty() const
Definition: piece.h:116
static const int WallPiece
Definition: piece.h:45
bool operator!=(const Piece &other) const
Definition: piece.h:101
void setType(int type)
Definition: piece.h:146
Definition: boardscene.h:28
bool operator>(const Piece &other) const
Definition: piece.h:111
void setSide(Side side)
Definition: piece.h:141
Side side() const
Definition: piece.h:131
The side or color of a chess player.
Definition: side.h:34
bool isValid() const
Definition: piece.h:121
A chess piece.
Definition: piece.h:39
bool isNull() const
Definition: side.h:88
int type() const
Definition: piece.h:136
bool operator<(const Piece &other) const
Definition: piece.h:106
Type
Definition: side.h:40