aboutsummaryrefslogtreecommitdiff
path: root/src/main/input-output
diff options
context:
space:
mode:
authorCharlie Blake2018-02-23 11:51:06 +0000
committerGitHub2018-02-23 11:51:06 +0000
commitdd731b92b0a8f984ddbef11d31bc70acfa266510 (patch)
tree071d463dc62ec584ef275759f7dbc450027a99d7 /src/main/input-output
parentMerge pull request #39 from thecharlesblake/update-objectives (diff)
parentEnable suit reduction for non-foundation games (diff)
downloadmetasol-dd731b92b0a8f984ddbef11d31bc70acfa266510.tar.gz
metasol-dd731b92b0a8f984ddbef11d31bc70acfa266510.zip

Merge pull request #40 from thecharlesblake/test-optimisations

Test optimisations

Diffstat (limited to 'src/main/input-output')
-rw-r--r--src/main/input-output/input/command_line_helper.cpp10
-rw-r--r--src/main/input-output/input/command_line_helper.h2
2 files changed, 11 insertions, 1 deletions
diff --git a/src/main/input-output/input/command_line_helper.cpp b/src/main/input-output/input/command_line_helper.cpp
index 2391e3a..465bcd4 100644
--- a/src/main/input-output/input/command_line_helper.cpp
+++ b/src/main/input-output/input/command_line_helper.cpp
@@ -29,7 +29,9 @@ command_line_helper::command_line_helper()
"to be solved. Must supply either 'type' or 'rules' file")
("random", po::value<int>(), "create and solve a random solitaire "
"deal based on a seed. Must supply either 'random' or list "
- "of deals to be sold.");
+ "of deals to be sold.")
+ ("classify", "outputs a simple 'solvable/not solvable' "
+ "classification");
po::options_description hidden_options("Hidden options");
hidden_options.add_options()
@@ -60,6 +62,8 @@ bool command_line_helper::parse(int argc, const char* argv[]) {
help = (vm.count("help") != 0);
+ classify = (vm.count("classify") != 0);
+
if (vm.count("input-files")) {
input_files = vm["input-files"].as<vector<string>>();
}
@@ -168,3 +172,7 @@ int command_line_helper::get_random_deal() {
bool command_line_helper::get_help() {
return help;
}
+
+bool command_line_helper::get_classify() {
+ return classify;
+}
diff --git a/src/main/input-output/input/command_line_helper.h b/src/main/input-output/input/command_line_helper.h
index fd1468c..9905aff 100644
--- a/src/main/input-output/input/command_line_helper.h
+++ b/src/main/input-output/input/command_line_helper.h
@@ -17,6 +17,7 @@ public:
const std::string get_rules_file();
int get_random_deal();
bool get_help();
+ bool get_classify();
private:
bool assess_errors();
@@ -35,6 +36,7 @@ private:
std::string rules_file;
int random_deal;
bool help;
+ bool classify;
};
#endif //SOLVITAIRE_COMMAND_LINE_HELPER_H