diff options
Diffstat (limited to 'src/main/game/global_cache.h')
| -rw-r--r-- | src/main/game/global_cache.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/main/game/global_cache.h b/src/main/game/global_cache.h index 0e8fe0c..2d99275 100644 --- a/src/main/game/global_cache.h +++ b/src/main/game/global_cache.h @@ -13,8 +13,7 @@ class predicate { public: - explicit predicate(const game_state&); - static bool comp_pile(const pile&, const pile&); + predicate(const game_state&); bool operator() (const std::vector<pile>&, const std::vector<pile>&) const; private: const game_state& init_gs; @@ -32,12 +31,16 @@ struct hasher { const game_state& init_gs; }; -struct global_cache { +class global_cache { +public: explicit global_cache(const game_state&); - bool insert(const std::vector<pile>&); - bool contains(const std::vector<pile>&) const; + bool insert(const game_state&); + bool contains(const game_state&) const; void clear(); +private: + static std::vector<pile> get_ordered_vec(const game_state&); + std::unordered_set< std::vector<pile>, hasher, |
