aboutsummaryrefslogtreecommitdiff
path: root/cpp/nissy.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-08-07 15:09:46 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-08-07 15:28:01 +0200
commit5355de2921126e2b75e24abd57e17556e22a6ed0 (patch)
tree0df679e152ffb2798248982ac58ff123c6859114 /cpp/nissy.h
parent57a7520545134ab95f7bb0397dcbe991c906a3e9 (diff)
downloadnissy-core-5355de2921126e2b75e24abd57e17556e22a6ed0.tar.gz
nissy-core-5355de2921126e2b75e24abd57e17556e22a6ed0.zip
Added API function for solution variations
Diffstat (limited to '')
-rw-r--r--cpp/nissy.h16
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();

Generated with cgit - Back to sebastiano.tronto.net