From 7fbc0405828a1d71b8a2ef0a14e2476adc1550cb Mon Sep 17 00:00:00 2001 From: Charlie Blake Date: Wed, 4 Jul 2018 14:35:42 +0100 Subject: Add variants for streamliner cmd line options --- src/main/main.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/main/main.cpp') 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 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 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); -- cgit v1.2.1