85 : m_data(type | (
Side::NoSide << 10))
90 : m_data(type | (side << 10))
99 return m_data == other.m_data;
104 return m_data != other.m_data;
109 return m_data < other.m_data;
114 return m_data > other.m_data;
139 return m_data & 0x3FF;
149 m_data =
type | (m_data & 0xC00);
static const int NoPiece
Definition: piece.h:44
bool operator==(const Piece &other) const
Definition: piece.h:97
Piece(int type=NoPiece)
Definition: piece.h:84
bool isWall() const
Definition: piece.h:127
bool isEmpty() const
Definition: piece.h:117
static const int WallPiece
Definition: piece.h:46
bool operator!=(const Piece &other) const
Definition: piece.h:102
void setType(int type)
Definition: piece.h:147
Definition: boardscene.h:29
bool operator>(const Piece &other) const
Definition: piece.h:112
void setSide(Side side)
Definition: piece.h:142
Side side() const
Definition: piece.h:132
The side or color of a chess player.
Definition: side.h:35
bool isValid() const
Definition: piece.h:122
A chess piece.
Definition: piece.h:40
bool isNull() const
Definition: side.h:89
int type() const
Definition: piece.h:137
bool operator<(const Piece &other) const
Definition: piece.h:107
Type
Definition: side.h:41