8 Piece::Piece(Color color
, Type type
)
12 Piece::Color
Piece::color() const { return m_color
; }
14 Piece::Type
Piece::type() const { return m_type
; }
16 QString
Piece::colorName() const { return colorName(m_color
); }
18 QString
Piece::colorName(Color color
) {
29 QString
Piece::typeName() const { return typeName(m_type
); }
31 QString
Piece::typeName(Type type
) {
50 QString
Piece::name() const {
51 return colorName() + '_' + typeName();
54 Piece::Color
Piece::oppositeColor(Color color
) {
65 bool Piece::operator==(const Piece
& other
) const {
66 return m_color
== other
.m_color
&&
67 m_type
== other
.m_type
;
70 bool Piece::operator!=(const Piece
& other
) const {
71 return !((*this) == other
);
74 } // namespace HLVariant