From c5e5d9d6bbd7d7d2a6c6463505e7b7031e846ebf Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Tue, 24 Oct 2017 01:23:00 +0100 Subject: Draft of OO game logic --- src/main/game_state.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/main/game_state.h (limited to 'src/main/game_state.h') diff --git a/src/main/game_state.h b/src/main/game_state.h new file mode 100644 index 0000000..693b127 --- /dev/null +++ b/src/main/game_state.h @@ -0,0 +1,28 @@ +// +// Created by thecharlesblake on 10/23/17. +// + +#ifndef SOLVITAIRE_GAME_STATE_H +#define SOLVITAIRE_GAME_STATE_H + +#include +#include + +#include + +#include "card.h + +class game_state { +public: + game_state(const rapidjson::Document&); + virtual std::vector get_next_legal_states() const = 0; + virtual bool is_solved() const = 0; + virtual std::ostream& print(std::ostream&) const; + + friend std::ostream& operator<< (std::ostream&, const game_state&); + +protected: + std::vector> tableau_piles; +}; + +#endif //SOLVITAIRE_GAME_STATE_H -- cgit v1.2.1