2 Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2007 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
13 Piece::Piece(const IColor
* color
, const IType
* type
)
17 const IColor
* Piece::color() const { return m_color
; }
19 const IType
* Piece::type() const { return m_type
; }
20 void Piece::setType(const IType
* type
) { m_type
= type
; }
22 bool Piece::operator==(const Piece
& piece
) const {
23 return m_type
== piece
.type() &&
24 m_color
== piece
.color();
27 bool Piece::operator!=(const Piece
& piece
) const {
28 return !(operator==(piece
));