aboutsummaryrefslogtreecommitdiff
path: root/test/080_allowednext
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-03-22 06:43:11 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2025-03-22 18:45:47 +0100
commitce3f1cc0ef9f46d70ab5387b1458e9098b40711d (patch)
tree4949745670b829f2211381bf14b8440dcc6ca7b1 /test/080_allowednext
parent0550a16c1cce868bbc3f3b5ad59f80e35cf2a6cd (diff)
downloadnissy-core-ce3f1cc0ef9f46d70ab5387b1458e9098b40711d.tar.gz
nissy-core-ce3f1cc0ef9f46d70ab5387b1458e9098b40711d.zip
Some safety with move arrays, small refactor appendchar
Diffstat (limited to 'test/080_allowednext')
-rw-r--r--test/080_allowednext/allowednext_tests.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/080_allowednext/allowednext_tests.c b/test/080_allowednext/allowednext_tests.c
index 644d4c5..08fe491 100644
--- a/test/080_allowednext/allowednext_tests.c
+++ b/test/080_allowednext/allowednext_tests.c
@@ -1,6 +1,6 @@
1#include "../test.h" 1#include "../test.h"
2 2
3bool allowednextmove(uint8_t *, uint8_t); 3bool allowednextmove(size_t n, const uint8_t [n]);
4 4
5static char *moves[] = { 5static char *moves[] = {
6 "U", "U2", "U'", 6 "U", "U2", "U'",
@@ -31,5 +31,5 @@ void run(void) {
31 n > 2 ? moves[m[n-3]] : "-", 31 n > 2 ? moves[m[n-3]] : "-",
32 n > 1 ? moves[m[n-2]] : "-", 32 n > 1 ? moves[m[n-2]] : "-",
33 n > 0 ? moves[m[n-1]] : "-"); 33 n > 0 ? moves[m[n-1]] : "-");
34 printf("%s\n", allowednextmove(m, n) ? "true" : "false"); 34 printf("%s\n", allowednextmove(n, m) ? "true" : "false");
35} 35}

Generated with cgit - Back to sebastiano.tronto.net