diff options
| author | Charlie Blake | 2018-01-18 23:57:52 +0000 |
|---|---|---|
| committer | GitHub | 2018-01-18 23:57:52 +0000 |
| commit | bcaff64bdeaab93ff0d40dfd039b4b43ff689b1c (patch) | |
| tree | 7882812349716607773458b1c830579de802793f /src/main/game/pile.cpp | |
| parent | Merge pull request #29 from thecharlesblake/refactor-improve-debug (diff) | |
| parent | Removes unnecessary assert statement bug (diff) | |
| download | metasol-bcaff64bdeaab93ff0d40dfd039b4b43ff689b1c.tar.gz metasol-bcaff64bdeaab93ff0d40dfd039b4b43ff689b1c.zip | |
Merge pull request #30 from thecharlesblake/symmetrical-hash
Symmetrical hash
Diffstat (limited to 'src/main/game/pile.cpp')
| -rw-r--r-- | src/main/game/pile.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/main/game/pile.cpp b/src/main/game/pile.cpp index 82ae344..21eddc0 100644 --- a/src/main/game/pile.cpp +++ b/src/main/game/pile.cpp @@ -5,12 +5,15 @@ #include <vector> #include <ostream> -#include <boost/functional/hash.hpp> - #include "pile.h" using namespace std; -using namespace boost; + +pile::pile(std::vector<card> pv) : pile_vec(pv) { +} + +pile::pile(std::initializer_list<card> il) : pile_vec(il) { +} card pile::top_card() const { assert(!empty()); @@ -47,7 +50,3 @@ card pile::take() { bool operator==(const pile& a, const pile& b) { return a.pile_vec == b.pile_vec; } - -size_t hash_value(pile const& p) { - return hash_range(begin(p.pile_vec), end(p.pile_vec)); -} |
