aboutsummaryrefslogtreecommitdiff
path: root/src/main/game/game_state.h
diff options
context:
space:
mode:
authorthecharlesblake2017-11-12 22:41:27 +0000
committerthecharlesblake2017-11-12 22:41:27 +0000
commit076a6b129e6b35779ea946a5738357e9348c7f7e (patch)
treebffe0dfb271cf4ff920c8c6f2eec842fe9db5005 /src/main/game/game_state.h
parentRefactor and improve state printing (diff)
downloadmetasol-076a6b129e6b35779ea946a5738357e9348c7f7e.tar.gz
metasol-076a6b129e6b35779ea946a5738357e9348c7f7e.zip

Refactor game state

Diffstat (limited to 'src/main/game/game_state.h')
-rw-r--r--src/main/game/game_state.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/game/game_state.h b/src/main/game/game_state.h
index 6b2af7d..12dcda9 100644
--- a/src/main/game/game_state.h
+++ b/src/main/game/game_state.h
@@ -22,7 +22,7 @@ public:
// Do the same from a 'rules' object
game_state(int seed, const sol_rules&);
- std::vector<game_state> get_next_legal_states() const;
+ const std::vector<game_state> get_next_legal_states() const;
bool is_solved() const;
std::ostream& print(std::ostream&) const;
@@ -33,6 +33,9 @@ public:
private:
static std::vector<card> shuffled_deck(int, int);
+ const game_state move(game_state&, pile*, pile*) const;
+ std::vector<pile*> get_regular_pile_refs();
+
void print_header(std::ostream&, const char*) const;
void print_piles(std::ostream&, const std::vector<pile>&) const;
void print_pile(std::ostream&, const pile&) const;