aboutsummaryrefslogtreecommitdiff
path: root/src/nissy.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-07-31 09:47:57 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-07-31 09:47:57 +0200
commit992de12cc081e7dde16c3c231f83bfa77c67825a (patch)
treeaf0b2d51b1a6cd92ae2cd6a32d581d752ddce8ea /src/nissy.h
parente2b154c40acaac4e7a7b3e379ada0404519c3750 (diff)
downloadnissy-core-992de12cc081e7dde16c3c231f83bfa77c67825a.tar.gz
nissy-core-992de12cc081e7dde16c3c231f83bfa77c67825a.zip
Added move sequence comparison function
Diffstat (limited to 'src/nissy.h')
-rw-r--r--src/nissy.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/nissy.h b/src/nissy.h
index 0c1d18d..38fe656 100644
--- a/src/nissy.h
+++ b/src/nissy.h
@@ -42,6 +42,10 @@ for example 'rotation UF' or 'mirrored BL'.
42#define NISSY_STATUS_STOP 1 42#define NISSY_STATUS_STOP 1
43#define NISSY_STATUS_PAUSE 2 43#define NISSY_STATUS_PAUSE 2
44 44
45/* Possible results of move sequence comparison */
46#define NISSY_COMPARE_MOVES_EQUAL 0
47#define NISSY_COMPARE_MOVES_DIFFERENT 99
48
45/* The solved cube */ 49/* The solved cube */
46#define NISSY_SOLVED_CUBE "ABCDEFGH=ABCDEFGHIJKL=A" 50#define NISSY_SOLVED_CUBE "ABCDEFGH=ABCDEFGHIJKL=A"
47 51
@@ -375,6 +379,24 @@ nissy_countmoves(
375); 379);
376 380
377/* 381/*
382Parameters:
383 moves1 - The first sequence of moves to compare.
384 moves2 - The second sequence of moves to compare.
385
386Return values:
387 NISSY_ERROR_INVALID_MOVES - One of the given moves sequences is invalid.
388 NISSY_ERROR_NULL_POINTER - One of the arguments is NULL.
389 NISSY_COMPARE_MOVES_EQUAL - The two moves sequences are indentical, up
390 to swapping parallel moves.
391 NISSY_COMPARE_MOVES_DIFFERENT - The two moves sequences are different.
392*/
393long long
394nissy_comparemoves(
395 const char *moves1,
396 const char *moves2
397);
398
399/*
378Set a global logger function used by this library. Setting the logger to NULL 400Set a global logger function used by this library. Setting the logger to NULL
379disables logging. 401disables logging.
380 402

Generated with cgit - Back to sebastiano.tronto.net