diff options
| author | Charlie Blake | 2018-07-04 14:35:42 +0100 |
|---|---|---|
| committer | Charlie Blake | 2018-07-04 14:35:42 +0100 |
| commit | 7fbc0405828a1d71b8a2ef0a14e2476adc1550cb (patch) | |
| tree | f84aa2ae3c1a2c7e141a306c85932fda2fd91355 /src/main/main.cpp | |
| parent | Add 10% timeout for str and make rerun (diff) | |
| download | metasol-7fbc0405828a1d71b8a2ef0a14e2476adc1550cb.tar.gz metasol-7fbc0405828a1d71b8a2ef0a14e2476adc1550cb.zip | |
Add variants for streamliner cmd line options
Diffstat (limited to 'src/main/main.cpp')
| -rw-r--r-- | src/main/main.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/main.cpp b/src/main/main.cpp index a6ed318..5c8708e 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -60,7 +60,7 @@ int main(int argc, const char* argv[]) { } // If the benchmark option has been supplied, generates it else if (clh.get_benchmark()) { - benchmark::run(*rules, clh.get_cache_capacity(), clh.get_streamliners()); + benchmark::run(*rules, clh.get_cache_capacity(), clh.get_streamliners_game_state()); } // Otherwise there are supplied input files which should be solved else { @@ -93,18 +93,21 @@ const optional<sol_rules> gen_rules(command_line_helper& clh) { void solve_random_game(int seed, const sol_rules& rules, command_line_helper& clh) { LOG_INFO ("Attempting to solve with seed: " << seed << "..."); - game_state gs(rules, seed, clh.get_streamliners()); + game_state::streamliner_options stream_opts = clh.get_streamliners_game_state(); + game_state gs(rules, seed, stream_opts); solve_game(gs, clh); } void solve_input_files(const vector<string> input_files, const sol_rules& rules, command_line_helper& clh) { + game_state::streamliner_options stream_opts = clh.get_streamliners_game_state(); + for (const string& input_file : input_files) { try { // Reads in the input file to a json doc const Document in_doc = json_helper::get_file_json(input_file); // Attempts to create a game state object from the json - game_state gs(rules, in_doc, clh.get_streamliners()); + game_state gs(rules, in_doc, stream_opts); LOG_INFO ("Attempting to solve " << input_file << "..."); solve_game(gs, clh); |
