From 5355de2921126e2b75e24abd57e17556e22a6ed0 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 7 Aug 2025 15:09:46 +0200 Subject: Added API function for solution variations --- src/nissy.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/nissy.c') diff --git a/src/nissy.c b/src/nissy.c index 4b5d476..17ef960 100644 --- a/src/nissy.c +++ b/src/nissy.c @@ -148,6 +148,32 @@ nissy_applytrans_error: return err; } +long long +nissy_variations( + const char *moves, + const char *variation, + unsigned long long result_size, + char *result +) +{ + if (moves == NULL) { + LOG("[variations] Error: 'moves' argument is NULL\n"); + return NISSY_ERROR_NULL_POINTER; + } + + if (variation == NULL) { + LOG("[variations] Error: 'variation' argument is NULL\n"); + return NISSY_ERROR_NULL_POINTER; + } + + if (result == NULL) { + LOG("[variations] Error: 'result' argument is NULL\n"); + return NISSY_ERROR_NULL_POINTER; + } + + return move_variations(moves, variation, result_size, result); +} + long long nissy_getcube( long long ep, -- cgit v1.3