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;
144 m_data =
type() | (side << 10);
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
bool isValid() const
Definition: piece.h:122
Piece(int type=NoPiece)
Definition: piece.h:84
bool isEmpty() const
Definition: piece.h:117
bool operator!=(const Piece &other) const
Definition: piece.h:102
bool operator<(const Piece &other) const
Definition: piece.h:107
bool isWall() const
Definition: piece.h:127
bool operator>(const Piece &other) const
Definition: piece.h:112
static const int WallPiece
Definition: piece.h:46
void setType(int type)
Definition: piece.h:147
Definition: boardscene.h:29
void setSide(Side side)
Definition: piece.h:142
bool isNull() const
Definition: side.h:89
The side or color of a chess player.
Definition: side.h:35
Side side() const
Definition: piece.h:132
int type() const
Definition: piece.h:137
A chess piece.
Definition: piece.h:40
Type
Definition: side.h:41