diff options
| author | thecharlesblake | 2018-02-14 16:56:49 +0000 |
|---|---|---|
| committer | thecharlesblake | 2018-02-14 16:59:07 +0000 |
| commit | 53ff6d630627c066757bb7c83281ad5281b19091 (patch) | |
| tree | f12ba0f836413360d1687d781a5b49aa46633063 /src/main/main.cpp | |
| parent | Refactor resources directory (diff) | |
| download | metasol-53ff6d630627c066757bb7c83281ad5281b19091.tar.gz metasol-53ff6d630627c066757bb7c83281ad5281b19091.zip | |
Improve solution printing
Diffstat (limited to 'src/main/main.cpp')
| -rw-r--r-- | src/main/main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/main.cpp b/src/main/main.cpp index 78a3551..975e6c8 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -2,6 +2,8 @@ #include <boost/optional.hpp> #include <rapidjson/document.h> +#include <gperftools/profiler.h> + #include "input-output/input/command_line_helper.h" #include "input-output/input/json-parsing/json_helper.h" #include "input-output/input/json-parsing/rules_parser.h" @@ -92,10 +94,12 @@ void solve_input_files(const vector<string> input_files, const sol_rules& rules) void solve_game(const game_state& gs) { solver solv(gs); bool solution = solv.run(); + ProfilerStop(); if (solution) { solv.print_solution(); } else { - cout << "Deal:\n" << gs << "\nNo Possible Solution\n"; + cout << "Deal:\n" << gs << "\nNo Possible Solution\nStates Searched: " + << solv.get_states_searched() << "\n"; } } |
