diff options
| author | Charlie Blake | 2017-11-06 14:31:04 +0000 |
|---|---|---|
| committer | GitHub | 2017-11-06 14:31:04 +0000 |
| commit | d67ed718a0955c577cafc5716dc5ec5dc0129e9d (patch) | |
| tree | f9c8a6578fcd73548a88ea8f06c2f22c8310cce8 /src/main/sol_rules.h | |
| parent | Merge pull request #14 from thecharlesblake/simple-black-hole (diff) | |
| parent | Add counting of states searched (diff) | |
| download | metasol-d67ed718a0955c577cafc5716dc5ec5dc0129e9d.tar.gz metasol-d67ed718a0955c577cafc5716dc5ec5dc0129e9d.zip | |
Merge pull request #15 from thecharlesblake/spanish-patience
Spanish patience
Diffstat (limited to 'src/main/sol_rules.h')
| -rw-r--r-- | src/main/sol_rules.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/main/sol_rules.h b/src/main/sol_rules.h new file mode 100644 index 0000000..671e8b7 --- /dev/null +++ b/src/main/sol_rules.h @@ -0,0 +1,50 @@ +// +// 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 + }; + enum class build_order { + NO_BUILD, + DESCENDING, + ASCENDING, + BOTH + }; + enum class build_policy { + CLUBS, + DIAMONDS, + HEARTS, + SPADES, + ANY_SUIT, + SAME_SUIT + }; + + static std::vector<std::string> valid_sol_strs; + static bool is_suit(build_policy); + static int suit_val(build_policy); + + sol_rules(std::string); + + int tableau_pile_count; + build_order build_ord; + int max_rank; + bool hole; + bool foundations; + +private: + static valid_sol valid_sol_enum(const std::string&); +}; + +#endif //SOLVITAIRE_SOL_RULES_H |
