aboutsummaryrefslogtreecommitdiff
path: root/test/001_pieces/pieces_tests.c
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-06-09 12:43:49 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-06-09 12:43:49 +0200
commitc5c5017a335208881e27fc8f72c1d0145a04622a (patch)
tree7a1518e5b05f3fbde810fa3080c41099ba7d5ae8 /test/001_pieces/pieces_tests.c
parent28ad019d62583b7e89b4e76922aa73857d5876eb (diff)
downloadnissy-core-c5c5017a335208881e27fc8f72c1d0145a04622a.tar.gz
nissy-core-c5c5017a335208881e27fc8f72c1d0145a04622a.zip
Remvoed cube_fast_t and more. More cleaning up to do.
Diffstat (limited to 'test/001_pieces/pieces_tests.c')
-rw-r--r--test/001_pieces/pieces_tests.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/001_pieces/pieces_tests.c b/test/001_pieces/pieces_tests.c
index f3d8d4e..1ef2fd0 100644
--- a/test/001_pieces/pieces_tests.c
+++ b/test/001_pieces/pieces_tests.c
@@ -1,13 +1,12 @@
1#include "../test.h" 1#include "../test.h"
2 2
3uint8_t corner(cube_fast_t, int); 3void pieces(cube_t *, uint8_t [static 8], uint8_t [static 12]);
4uint8_t edge(cube_fast_t, int);
5 4
6int main(void) { 5int main(void) {
7 int i; 6 int i;
7 uint8_t corner[8], edge[12];
8 char str[STRLENMAX], *aux; 8 char str[STRLENMAX], *aux;
9 cube_t cube; 9 cube_t cube;
10 cube_fast_t fast;
11 10
12 aux = str; 11 aux = str;
13 while (fgets(aux, STRLENMAX, stdin) != NULL) 12 while (fgets(aux, STRLENMAX, stdin) != NULL)
@@ -15,13 +14,13 @@ int main(void) {
15 aux++; 14 aux++;
16 15
17 cube = readcube("H48", str); 16 cube = readcube("H48", str);
18 fast = cubetofast(cube); 17 pieces(&cube, corner, edge);
19 18
20 for (i = 0; i < 8; i++) 19 for (i = 0; i < 8; i++)
21 printf("%" PRIu8 " ", corner(fast, i)); 20 printf("%" PRIu8 " ", corner[i]);
22 printf("\n"); 21 printf("\n");
23 for (i = 0; i < 12; i++) 22 for (i = 0; i < 12; i++)
24 printf("%" PRIu8 " ", edge(fast, i)); 23 printf("%" PRIu8 " ", edge[i]);
25 printf("\n"); 24 printf("\n");
26 25
27 return 0; 26 return 0;

Generated with cgit - Back to sebastiano.tronto.net