aboutsummaryrefslogtreecommitdiff
path: root/src/main/game/global_cache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/game/global_cache.cpp')
-rw-r--r--src/main/game/global_cache.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/game/global_cache.cpp b/src/main/game/global_cache.cpp
index f55a72c..e881408 100644
--- a/src/main/game/global_cache.cpp
+++ b/src/main/game/global_cache.cpp
@@ -2,8 +2,12 @@
// Created by thecharlesblake on 1/10/18.
//
+#include <boost/functional/hash.hpp>
+
#include "global_cache.h"
+using namespace std;
+using namespace boost;
typedef sol_rules::build_policy pol;
@@ -40,3 +44,7 @@ size_t hash_value(card const& c) {
auto raw_val = static_cast<unsigned char>(suit_val * 13 + c.get_rank());
return hasher(raw_val);
}
+
+size_t hash_value(pile const& p) {
+ return hash_range(begin(p.pile_vec), end(p.pile_vec));
+}