diff options
Diffstat (limited to 'src/main/input-output/input')
4 files changed, 4 insertions, 30 deletions
diff --git a/src/main/input-output/input/command_line_helper.cpp b/src/main/input-output/input/command_line_helper.cpp index 92fef21..4b0942a 100644 --- a/src/main/input-output/input/command_line_helper.cpp +++ b/src/main/input-output/input/command_line_helper.cpp @@ -38,8 +38,6 @@ command_line_helper::command_line_helper() "'solvability', 'benchmark' or list of deals to be solved.") ("classify", "outputs a simple 'solvable/not solvable' " "classification") - ("shortest-sols", "for each instance returns the shortest possible " - "solution. cannot be supplied alongside '--solvability'") ("solvability", "calculates the solvability " "percentage of the supplied solitaire game. Must supply " "either 'random', 'benchmark', 'solvability' or list of deals to be " @@ -108,8 +106,6 @@ bool command_line_helper::parse(int argc, const char* argv[]) { benchmark = (vm.count("benchmark") != 0); - shortest_sols = (vm.count("shortest-sols") != 0); - // Handle logic error scenarios return assess_errors(); } @@ -141,11 +137,6 @@ bool command_line_helper::assess_errors() { return false; } - if (shortest_sols && solvability) { - print_shortest_sols_error(); - return false; - } - if (!solitaire_type.empty()) { return assess_sol_type(); } else { @@ -188,11 +179,6 @@ void command_line_helper::print_too_many_opts_error() { print_help(); } -void command_line_helper::print_shortest_sols_error() { - LOG_ERROR ("Error: User cannot supply '--shortest-sols' and '--solvability'"); - print_help(); -} - const vector<string> command_line_helper::get_input_files() { return input_files; } @@ -209,10 +195,6 @@ int command_line_helper::get_random_deal() { return random_deal; } -bool command_line_helper::get_help() { - return help; -} - bool command_line_helper::get_classify() { return classify; } @@ -229,10 +211,6 @@ string command_line_helper::get_describe_game_rules() { return describe_game_rules; } -bool command_line_helper::get_short_sols() { - return shortest_sols; -} - bool command_line_helper::get_benchmark() { return benchmark; } diff --git a/src/main/input-output/input/command_line_helper.h b/src/main/input-output/input/command_line_helper.h index e436f13..911cd5a 100644 --- a/src/main/input-output/input/command_line_helper.h +++ b/src/main/input-output/input/command_line_helper.h @@ -16,10 +16,8 @@ public: const std::string get_solitaire_type(); const std::string get_rules_file(); int get_random_deal(); - bool get_help(); bool get_classify(); bool get_solvability(); - bool get_short_sols(); bool get_available_game_types(); bool get_benchmark(); std::string get_describe_game_rules(); @@ -31,7 +29,6 @@ private: void print_sol_type_rules_error(); void print_no_opts_error(); void print_too_many_opts_error(); - void print_shortest_sols_error(); boost::program_options::options_description cmdline_options; boost::program_options::options_description main_options; @@ -45,7 +42,6 @@ private: bool help; bool classify; bool solvability; - bool shortest_sols; bool available_game_types; bool benchmark; }; diff --git a/src/main/input-output/input/json-parsing/deal_parser.cpp b/src/main/input-output/input/json-parsing/deal_parser.cpp index f841c8d..29ac3b1 100644 --- a/src/main/input-output/input/json-parsing/deal_parser.cpp +++ b/src/main/input-output/input/json-parsing/deal_parser.cpp @@ -3,7 +3,7 @@ // #include "deal_parser.h" -#include "../../../game/game_state.h" +#include "../../../game/search-state/game_state.h" #include "json_helper.h" using namespace std; @@ -166,9 +166,9 @@ void deal_parser::parse_reserve(game_state &gs, const Document& doc) { json_helper::json_parse_err("Incorrect reserve size"); } - for (game_state::pile_ref i = 0; i < json_card_arr.Size(); i++) { + for (pile::ref i = 0; i < json_card_arr.Size(); i++) { assert(json_card_arr[i].IsString()); - game_state::pile_ref pr = gs.original_reserve[0]; + pile::ref pr = gs.original_reserve[0]; if (!gs.rules.reserve_stacked) pr += i; gs.place_card(pr, card(json_card_arr[i].GetString())); } diff --git a/src/main/input-output/input/sol_preset_types.cpp b/src/main/input-output/input/sol_preset_types.cpp index 07c824b..53141a8 100644 --- a/src/main/input-output/input/sol_preset_types.cpp +++ b/src/main/input-output/input/sol_preset_types.cpp @@ -312,7 +312,7 @@ map<string, string> sol_preset_types::mp = { "build policy": "same-suit", "move built group": true }, - "max rank": 5, + "max rank": 6, "foundations initial card": true } )" |
