diff --git a/game/rack.cpp b/game/rack.cpp index 5cee9fd..5296c96 100644 --- a/game/rack.cpp +++ b/game/rack.cpp @@ -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; +} + + diff --git a/game/rack.h b/game/rack.h index 5c54136..0fa280b 100644 --- a/game/rack.h +++ b/game/rack.h @@ -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 m_tiles;