diff options
| author | thecharlesblake | 2018-01-12 19:03:23 +0000 |
|---|---|---|
| committer | thecharlesblake | 2018-01-12 19:03:23 +0000 |
| commit | add27468ed6ee09a9df6f885becc6b0428f666bf (patch) | |
| tree | 18c0f37f59fdb724de61fdf5ca51f4e07abb5c44 /src/main/game/global_cache.h | |
| parent | Implement hash for piles (diff) | |
| download | metasol-add27468ed6ee09a9df6f885becc6b0428f666bf.tar.gz metasol-add27468ed6ee09a9df6f885becc6b0428f666bf.zip | |
Implement symmetrical hash for pile vector
Diffstat (limited to 'src/main/game/global_cache.h')
| -rw-r--r-- | src/main/game/global_cache.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/game/global_cache.h b/src/main/game/global_cache.h index 26a73ef..73f0ce7 100644 --- a/src/main/game/global_cache.h +++ b/src/main/game/global_cache.h @@ -13,14 +13,15 @@ class global_cache { public: - explicit global_cache(const sol_rules&); + explicit global_cache(game_state); bool insert(const std::vector<pile>&); bool contains(const std::vector<pile>&); friend std::size_t hash_value(card const&); + friend std::size_t hash_value(std::vector<pile> const&); private: - static sol_rules rules; + static game_state init_gs; std::unordered_set< std::vector<pile>, |
