aboutsummaryrefslogtreecommitdiff
path: root/src/main/game/sol_rules.h
diff options
context:
space:
mode:
authorthecharlesblake2017-11-11 11:36:27 +0000
committerthecharlesblake2017-11-11 11:37:10 +0000
commitbba8775ce7c63783303240470d4a4b8404c9498b (patch)
treea3f6e5dc405ecb4637eca6c54e1261b5630a058c /src/main/game/sol_rules.h
parentMerge pull request #19 from thecharlesblake/canfield (diff)
downloadmetasol-bba8775ce7c63783303240470d4a4b8404c9498b.tar.gz
metasol-bba8775ce7c63783303240470d4a4b8404c9498b.zip

Add src file directory structure

Diffstat (limited to 'src/main/game/sol_rules.h')
-rw-r--r--src/main/game/sol_rules.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/main/game/sol_rules.h b/src/main/game/sol_rules.h
new file mode 100644
index 0000000..44b83bb
--- /dev/null
+++ b/src/main/game/sol_rules.h
@@ -0,0 +1,60 @@
+//
+// Created by thecharlesblake on 10/28/17.
+//
+
+#ifndef SOLVITAIRE_SOL_RULES_H
+#define SOLVITAIRE_SOL_RULES_H
+
+#include <vector>
+#include <string>
+
+class sol_rules {
+public:
+ enum class valid_sol {
+ BLACK_HOLE,
+ SIMPLE_BLACK_HOLE,
+ SPANISH_PATIENCE,
+ SIMPLE_SPANISH_PATIENCE,
+ FREE_CELL,
+ SIMPLE_FREE_CELL,
+ CANFIELD,
+ SIMPLE_CANFIELD
+ };
+ enum class build_order {
+ NO_BUILD,
+ DESCENDING,
+ ASCENDING,
+ BOTH,
+ SINGLE_CARD
+ };
+ enum class build_policy {
+ CLUBS,
+ DIAMONDS,
+ HEARTS,
+ SPADES,
+ ANY_SUIT,
+ SAME_SUIT,
+ RED_BLACK
+ };
+
+ static std::vector<std::string> valid_sol_strs;
+ static bool is_suit(build_policy);
+ static int suit_val(build_policy);
+
+ sol_rules(std::string);
+
+ unsigned int tableau_pile_count;
+ build_order build_ord;
+ build_policy build_pol;
+ unsigned int max_rank;
+ bool hole;
+ bool foundations;
+ unsigned int cells;
+ unsigned int reserve_size;
+ unsigned int stock_size;
+
+private:
+ static valid_sol valid_sol_enum(const std::string&);
+};
+
+#endif //SOLVITAIRE_SOL_RULES_H