Move: add operator==()

This commit is contained in:
Olivier Teulière 2012-12-30 16:13:45 +01:00
parent 62d46c875f
commit 86ed14f75e
2 changed files with 15 additions and 0 deletions

View file

@ -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;
}

View file

@ -121,6 +121,9 @@ class Move
/// To help debugging
wstring toString() const;
/// Equality operator
bool operator==(const Move &iOther) const;
private:
enum Type