Rack: add operator==()

This commit is contained in:
Olivier Teulière 2013-01-09 18:42:17 +01:00
parent 05150c4e86
commit 0cdc2b7ab4
2 changed files with 10 additions and 0 deletions

View file

@ -79,3 +79,11 @@ wstring Rack::toString() const
return rs;
}
bool Rack::operator==(const Rack &iOther) const
{
return m_tiles == iOther.m_tiles
&& m_ntiles == iOther.m_ntiles;
}

View file

@ -52,6 +52,8 @@ public:
wstring toString() const;
bool operator==(const Rack &iOther) const;
private:
/// Vector indexed by tile codes, containing the number of tiles
vector<unsigned int> m_tiles;