diff options
| author | Charlie Blake | 2017-11-13 09:52:23 +0000 |
|---|---|---|
| committer | GitHub | 2017-11-13 09:52:23 +0000 |
| commit | 96f9d446750e07c039ce5d482c92c464593c5bc9 (patch) | |
| tree | 5731e7eee2c041166479585daab804bc6d8e445c /src/main/game/sol_rules.h | |
| parent | Merge pull request #19 from thecharlesblake/canfield (diff) | |
| parent | Refactor solver (diff) | |
| download | metasol-96f9d446750e07c039ce5d482c92c464593c5bc9.tar.gz metasol-96f9d446750e07c039ce5d482c92c464593c5bc9.zip | |
Merge pull request #20 from thecharlesblake/initial-code-cleanup
Initial code cleanup
Diffstat (limited to 'src/main/game/sol_rules.h')
| -rw-r--r-- | src/main/game/sol_rules.h | 60 |
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..b73097d --- /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); + + explicit 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 |
