diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-08-07 15:09:46 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-08-07 15:28:01 +0200 |
| commit | 5355de2921126e2b75e24abd57e17556e22a6ed0 (patch) | |
| tree | 0df679e152ffb2798248982ac58ff123c6859114 /cpp/nissy.h | |
| parent | 57a7520545134ab95f7bb0397dcbe991c906a3e9 (diff) | |
| download | nissy-core-5355de2921126e2b75e24abd57e17556e22a6ed0.tar.gz nissy-core-5355de2921126e2b75e24abd57e17556e22a6ed0.zip | |
Added API function for solution variations
Diffstat (limited to 'cpp/nissy.h')
| -rw-r--r-- | cpp/nissy.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cpp/nissy.h b/cpp/nissy.h index 199af10..74bbd32 100644 --- a/cpp/nissy.h +++ b/cpp/nissy.h | |||
| @@ -39,6 +39,7 @@ namespace nissy { | |||
| 39 | static const error INVALID_MOVES; | 39 | static const error INVALID_MOVES; |
| 40 | static const error INVALID_TRANS; | 40 | static const error INVALID_TRANS; |
| 41 | static const error INVALID_SOLVER; | 41 | static const error INVALID_SOLVER; |
| 42 | static const error INVALID_VARIATION; | ||
| 42 | static const error NULL_POINTER; | 43 | static const error NULL_POINTER; |
| 43 | static const error BUFFER_SIZE; | 44 | static const error BUFFER_SIZE; |
| 44 | static const error DATA; | 45 | static const error DATA; |
| @@ -63,6 +64,21 @@ namespace nissy { | |||
| 63 | static const compare_result DIFFERENT; | 64 | static const compare_result DIFFERENT; |
| 64 | }; | 65 | }; |
| 65 | 66 | ||
| 67 | class variation { | ||
| 68 | public: | ||
| 69 | struct variations_result { | ||
| 70 | error err; | ||
| 71 | std::string solutions; | ||
| 72 | }; | ||
| 73 | |||
| 74 | const std::string name; | ||
| 75 | |||
| 76 | variations_result find_variations(const std::string&); | ||
| 77 | static std::variant<variation, error> get(const std::string&); | ||
| 78 | private: | ||
| 79 | variation(const std::string&); | ||
| 80 | }; | ||
| 81 | |||
| 66 | class cube { | 82 | class cube { |
| 67 | public: | 83 | public: |
| 68 | cube(); | 84 | cube(); |
