From a996283af7c21baaff0e114d58c34db820902c6f Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Sun, 27 Jan 2019 15:37:06 +0000 Subject: Reorganise repo All solvitaire content has been shoved into a subdirectory to tidy up the root of the project. This also means solvitaire is treated similarly to other dependencies of the project, and allows other dependencies to be added easily. There's also a lot of other work done here, such as usign a thread pool library to manage the running of the voters. --- src/main/api.h | 71 ---------------------------------------------------------- 1 file changed, 71 deletions(-) delete mode 100644 src/main/api.h (limited to 'src/main/api.h') diff --git a/src/main/api.h b/src/main/api.h deleted file mode 100644 index 2140d8e..0000000 --- a/src/main/api.h +++ /dev/null @@ -1,71 +0,0 @@ -#include -#include -#include -#include - -#include "game/move.h" -#include "game/sol_rules.h" -#include "game/card.h" - -typedef std::vector> piles; -typedef std::vector movelist; - -class game_state { - public: - game_state(const sol_rules&, piles); - game_state(const sol_rules&, - std::vector>, - std::vector>, - std::vector>); - - bool is_solved() const; - - enum class streamliner_options {NONE, AUTO_FOUNDATIONS, SUIT_SYMMETRY, BOTH}; - void make_move(move); - - friend std::ostream& operator<< (std::ostream&, const game_state&); - - private: - /* Game rules */ - - const sol_rules rules; - streamliner_options stream_opts; - card::rank_t foundations_base; - - /* Pile references */ - - std::list tableau_piles; - std::list cells; - pile::ref stock; - pile::ref waste; - std::list reserve; - std::vector foundations; - std::vector sequences; - std::list accordion; - pile::ref hole; - - /* Pile references of starting/original layout */ - - std::vector original_tableau_piles; - std::vector original_cells; - std::vector original_reserve; - - /* Auto-foundation moves state */ - - std::vector auto_foundation_moves; - - /* Core piles */ - - std::vector piles; -}; - -/** - * Populate a move list with a bunch of moves that lead to a solution. - * - * Clears the list, then, if a solution is found, populates it with the moves - * required to realise the solution. - * - * Returns true if a solution was found; false otherwise. - */ -finished_state get_moves(movelist& moves, game_state& gs, - uint64_t cache_capacity, uint64_t timeout); -- cgit v1.2.1