aboutsummaryrefslogtreecommitdiff
path: root/src/main/game/global_cache.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/game/global_cache.h')
-rw-r--r--src/main/game/global_cache.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/main/game/global_cache.h b/src/main/game/global_cache.h
new file mode 100644
index 0000000..b35acc6
--- /dev/null
+++ b/src/main/game/global_cache.h
@@ -0,0 +1,29 @@
+//
+// Created by thecharlesblake on 1/10/18.
+//
+
+#ifndef SOLVITAIRE_GLOBAL_CACHE_H
+#define SOLVITAIRE_GLOBAL_CACHE_H
+
+#include <vector>
+#include <unordered_set>
+
+#include "../game/game_state.h"
+#include "../game/sol_rules.h"
+
+class global_cache {
+public:
+ explicit global_cache(const sol_rules&);
+
+ bool insert(const std::vector<pile>&);
+ bool contains(const std::vector<pile>&);
+
+private:
+ std::unordered_set<
+ std::vector<pile>,
+ boost::hash<std::vector<pile>>
+ > u_set;
+};
+
+
+#endif //SOLVITAIRE_GLOBAL_CACHE_H