From 6d1a5cc75ad8e047d265d625d862e61080a69bea Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Sun, 31 Dec 2017 11:48:21 +0000 Subject: Update main to work with efficient solver --- src/main/main.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/main/main.cpp') 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 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 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"; } } -- cgit v1.2.1