aboutsummaryrefslogtreecommitdiff
path: root/test/130_appendsolution/appendsolution_tests.c
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-04-20 16:47:52 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-04-20 16:57:38 +0200
commitf1575ed335166a0897f2cfd314a0f4bade6a10fc (patch)
tree481c5d8ce5d14fe85fcd8f25cfbe4f94a697d5b5 /test/130_appendsolution/appendsolution_tests.c
parent3485be851f4fff1c9c6fe621f0619d2b4103bc06 (diff)
downloadnissy-core-f1575ed335166a0897f2cfd314a0f4bade6a10fc.tar.gz
nissy-core-f1575ed335166a0897f2cfd314a0f4bade6a10fc.zip
Improve order of moves in NISS solutions
Now the side that has more moves is written first. For example: write (U L F) B instead of B (U L F) This also fixes the test on appendsolutions, which used an older version of the function's signature.
Diffstat (limited to '')
-rw-r--r--test/130_appendsolution/appendsolution_tests.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/130_appendsolution/appendsolution_tests.c b/test/130_appendsolution/appendsolution_tests.c
index 066c305..abff359 100644
--- a/test/130_appendsolution/appendsolution_tests.c
+++ b/test/130_appendsolution/appendsolution_tests.c
@@ -17,7 +17,8 @@ int64_t readmoves(const char *, size_t n, uint8_t [n]);
17void solution_moves_reset(solution_moves_t [static 1]); 17void solution_moves_reset(solution_moves_t [static 1]);
18bool solution_list_init(solution_list_t [static 1], size_t n, char [n]); 18bool solution_list_init(solution_list_t [static 1], size_t n, char [n]);
19int64_t appendsolution(const solution_moves_t [static 1], 19int64_t appendsolution(const solution_moves_t [static 1],
20 const solution_settings_t [static 1], solution_list_t [static 1]); 20 const solution_settings_t [static 1], solution_list_t [static 1], bool,
21 const char *);
21 22
22void run(void) { 23void run(void) {
23 int i, ntrans; 24 int i, ntrans;
@@ -49,7 +50,7 @@ void run(void) {
49 settings.tmask |= UINT64_C(1) << (uint64_t)readtrans(str); 50 settings.tmask |= UINT64_C(1) << (uint64_t)readtrans(str);
50 } 51 }
51 52
52 appendsolution(&moves, &settings, &list); 53 appendsolution(&moves, &settings, &list, false, "Test");
53 54
54 printf("%s", list.buf); 55 printf("%s", list.buf);
55 printf("Number of solutions: %" PRIu64 "\n", list.nsols); 56 printf("Number of solutions: %" PRIu64 "\n", list.nsols);

Generated with cgit - Back to sebastiano.tronto.net