diff options
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/game/pile.cpp | 4 | ||||
| -rw-r--r-- | src/main/game/pile.h | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/main/game/pile.cpp b/src/main/game/pile.cpp index 382fa50..3136681 100644 --- a/src/main/game/pile.cpp +++ b/src/main/game/pile.cpp @@ -53,6 +53,10 @@ bool operator==(const pile& a, const pile& b) { return a.pile_vec == b.pile_vec; } +bool operator!=(const pile& a, const pile& b) { + return a.pile_vec != b.pile_vec; +} + bool operator<(const pile& a, const pile& b) { if (a.size() == b.size()) { return a.pile_vec < b.pile_vec; diff --git a/src/main/game/pile.h b/src/main/game/pile.h index 654f5be..d86ea37 100644 --- a/src/main/game/pile.h +++ b/src/main/game/pile.h @@ -33,15 +33,17 @@ public: card operator[] (size_type) const; friend bool operator==(const pile&, const pile&); + friend bool operator!=(const pile&, const pile&); friend bool operator<(const pile&, const pile&); friend bool operator>(const pile&, const pile&); friend bool operator<=(const pile&, const pile&); friend bool operator>=(const pile&, const pile&); -private: + // Modify void place(card); card take(); +private: // Underlying vector std::vector<card> pile_vec; }; |
