aboutsummaryrefslogtreecommitdiff
path: root/src/main/game/game_state.h
diff options
context:
space:
mode:
authorthecharlesblake2017-12-26 17:29:24 +0000
committerthecharlesblake2017-12-26 17:29:24 +0000
commitb8f4cae869eace06df73ac7c1c390cc42cfe499b (patch)
tree0440d8c082388f3fb04f7c977b16eeb4ddf024ef /src/main/game/game_state.h
parentRefactor game state to prep for deal parse (diff)
downloadmetasol-b8f4cae869eace06df73ac7c1c390cc42cfe499b.tar.gz
metasol-b8f4cae869eace06df73ac7c1c390cc42cfe499b.zip

Add basic tableau deal parsing

Diffstat (limited to 'src/main/game/game_state.h')
-rw-r--r--src/main/game/game_state.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/game/game_state.h b/src/main/game/game_state.h
index 6c0b77b..4b96b72 100644
--- a/src/main/game/game_state.h
+++ b/src/main/game/game_state.h
@@ -15,10 +15,13 @@
#include "sol_rules.h"
#include "pile.h"
+class deal_parser;
+
class game_state {
+ friend class deal_parser;
public:
// Create a game state representation from a JSON doc
- explicit game_state(const sol_rules&);
+ game_state(const sol_rules&, const rapidjson::Document&);
// Do the same from a 'rules' object
game_state(const sol_rules&, int seed);
@@ -33,6 +36,8 @@ public:
friend std::size_t hash_value(std::vector<pile> const&);
private:
+ explicit game_state(const sol_rules&);
+
static std::vector<card> shuffled_deck(int, int);
const game_state move(game_state&, pile*, pile*) const;