blob: 26a73efe366ce8645c034b7b736db4495992dc08 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
//
// 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>&);
friend std::size_t hash_value(card const&);
private:
static sol_rules rules;
std::unordered_set<
std::vector<pile>,
boost::hash<std::vector<pile>>
> u_set;
};
#endif //SOLVITAIRE_GLOBAL_CACHE_H
|