mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2024-11-17 07:48:27 +01:00
Move: add operator==()
This commit is contained in:
parent
62d46c875f
commit
86ed14f75e
2 changed files with 15 additions and 0 deletions
|
@ -163,3 +163,15 @@ wstring Move::toString() const
|
|||
return wss.str();
|
||||
}
|
||||
|
||||
|
||||
bool Move::operator==(const Move &iOther) const
|
||||
{
|
||||
return m_type == iOther.m_type
|
||||
&& m_score == iOther.m_score
|
||||
&& m_word == iOther.m_word
|
||||
&& m_coord == iOther.m_coord
|
||||
&& m_letters == iOther.m_letters
|
||||
&& m_round == iOther.m_round;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -121,6 +121,9 @@ class Move
|
|||
/// To help debugging
|
||||
wstring toString() const;
|
||||
|
||||
/// Equality operator
|
||||
bool operator==(const Move &iOther) const;
|
||||
|
||||
private:
|
||||
|
||||
enum Type
|
||||
|
|
Loading…
Reference in a new issue