diff options
Diffstat (limited to 'src/main/game/global_cache.cpp')
| -rw-r--r-- | src/main/game/global_cache.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/game/global_cache.cpp b/src/main/game/global_cache.cpp new file mode 100644 index 0000000..cc95b3b --- /dev/null +++ b/src/main/game/global_cache.cpp @@ -0,0 +1,16 @@ +// +// Created by thecharlesblake on 1/10/18. +// + +#include "global_cache.h" + + +global_cache::global_cache(const sol_rules&) {} + +bool global_cache::insert(const std::vector<pile>& pile_vec) { + return u_set.insert(pile_vec).second; +} + +bool global_cache::contains(const std::vector<pile>& pile_vec) { + return u_set.count(pile_vec) > 0; +} |
