diff options
| author | Charlie Blake | 2017-12-31 11:53:50 +0000 |
|---|---|---|
| committer | GitHub | 2017-12-31 11:53:50 +0000 |
| commit | 22e8b69a830d3e61be83762b9f1e6ce97bd3ec1e (patch) | |
| tree | faa726d97fcde3ea236f46e0c2b2d77a68f4cd9f /src/main/main.cpp | |
| parent | Merge pull request #26 from thecharlesblake/deal-description-and-test (diff) | |
| parent | Remove need for default switch in compile flags (diff) | |
| download | metasol-22e8b69a830d3e61be83762b9f1e6ce97bd3ec1e.tar.gz metasol-22e8b69a830d3e61be83762b9f1e6ce97bd3ec1e.zip | |
Merge pull request #27 from thecharlesblake/efficient-implementation
Efficient implementation
Diffstat (limited to 'src/main/main.cpp')
| -rw-r--r-- | src/main/main.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/main.cpp b/src/main/main.cpp index 158ca07..e07e566 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -89,13 +89,12 @@ void solve_input_files(const vector<string> input_files, const sol_rules& rules) } void solve_game(const game_state& gs, const sol_rules& rules) { - solver sol(gs, rules); + solver solv(gs, rules); + bool solution = solv.run(); - optional<solver::node> solution = sol.run(); if (solution) { - cout << "Solution:\n" << *solution << "States Searched: " - << sol.get_states_searched() << "\n"; + solv.print_solution(); } else { - cout << "Deal:\n" << sol.get_root() << "\nNo Possible Solution\n"; + cout << "Deal:\n" << gs << "\nNo Possible Solution\n"; } } |
