From 3eff79ed14f1fda1f148a9a4c5c3a1ae4edbee37 Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Thu, 26 Oct 2017 14:51:13 +0100 Subject: BH Solver with path outputted, based on user input --- src/main/solver.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/main/solver.h (limited to 'src/main/solver.h') diff --git a/src/main/solver.h b/src/main/solver.h new file mode 100644 index 0000000..0520cc7 --- /dev/null +++ b/src/main/solver.h @@ -0,0 +1,36 @@ +// +// Created by thecharlesblake on 10/24/17. +// + +#ifndef SOLVITAIRE_SOLVER_H +#define SOLVITAIRE_SOLVER_H + +#include +#include + +#include + +#include "game_state.h" + +class solver { +public: + solver(const game_state); + bool run(); + + friend std::ostream& operator<< (std::ostream&, const solver&); + +private: + struct node { + node(const game_state); + std::vector history; + game_state state; + }; + + const node root; + bool been_run; + node solution; + bool solution_found; +}; + + +#endif //SOLVITAIRE_SOLVER_H -- cgit v1.2.1