aboutsummaryrefslogtreecommitdiff
path: root/test/080_allowedmoves/allowedmoves_tests.c
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-04-01 09:33:26 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-04-01 09:33:26 +0200
commitb0053277e385bee23336d1fe6b69a12f49f9172f (patch)
tree531e44cd6f8e807c991d0a46692140667939fbe3 /test/080_allowedmoves/allowedmoves_tests.c
parentb6c1ff6cfdfe0f4ce602fe83e54c3112a1c95690 (diff)
downloadnissy-core-b0053277e385bee23336d1fe6b69a12f49f9172f.tar.gz
nissy-core-b0053277e385bee23336d1fe6b69a12f49f9172f.zip
simplified allowedmoves logic
Diffstat (limited to '')
-rw-r--r--test/080_allowedmoves/allowedmoves_tests.c (renamed from test/080_allowednext/allowednext_tests.c)8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/080_allowednext/allowednext_tests.c b/test/080_allowedmoves/allowedmoves_tests.c
index 08fe491..aa6bda7 100644
--- a/test/080_allowednext/allowednext_tests.c
+++ b/test/080_allowedmoves/allowedmoves_tests.c
@@ -1,6 +1,6 @@
1#include "../test.h" 1#include "../test.h"
2 2
3bool allowednextmove(size_t n, const uint8_t [n]); 3bool allowedmoves(size_t n, const uint8_t [n]);
4 4
5static char *moves[] = { 5static char *moves[] = {
6 "U", "U2", "U'", 6 "U", "U2", "U'",
@@ -27,9 +27,5 @@ void run(void) {
27 m[i] = j; 27 m[i] = j;
28 } 28 }
29 29
30 fprintf(stderr, "Last two: %s, %s\nNext: %s\n", 30 printf("%s\n", allowedmoves(n, m) ? "true" : "false");
31 n > 2 ? moves[m[n-3]] : "-",
32 n > 1 ? moves[m[n-2]] : "-",
33 n > 0 ? moves[m[n-1]] : "-");
34 printf("%s\n", allowednextmove(n, m) ? "true" : "false");
35} 31}

Generated with cgit - Back to sebastiano.tronto.net