// // Created by thecharlesblake on 10/24/17. // #ifndef SOLVITAIRE_GAME_STATE_H #define SOLVITAIRE_GAME_STATE_H #include #include #include #include #include "card.h" #include "sol_rules.h" #include "pile.h" class game_state { public: // Create a game state representation from a JSON doc game_state(const rapidjson::Document&); // Do the same from a 'rules' object game_state(int seed, const sol_rules&); std::vector get_next_legal_states(); // NOTE: will only be evaluated after get_next_legal_states() is called bool is_solved() const; std::ostream& print(std::ostream&) const; friend bool operator==(const game_state&, const game_state&); friend std::ostream& operator<< (std::ostream&, const game_state&); private: static std::vector shuffled_deck(int, int); void print_header(std::ostream&, const char*) const; void print_foundations(std::ostream&) const; void print_cells(std::ostream&) const; void print_tableau_piles(std::ostream&) const; void print_hole(std::ostream&) const; std::vector tableau_piles; std::vector cells; std::vector foundations; sol_rules rules; pile hole; }; #endif //SOLVITAIRE_GAME_STATE_H