aboutsummaryrefslogtreecommitdiff
path: root/test/062_transform_move
diff options
context:
space:
mode:
Diffstat (limited to 'test/062_transform_move')
-rw-r--r--test/062_transform_move/transform_move_tests.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/062_transform_move/transform_move_tests.c b/test/062_transform_move/transform_move_tests.c
index 66889f9..4f554c7 100644
--- a/test/062_transform_move/transform_move_tests.c
+++ b/test/062_transform_move/transform_move_tests.c
@@ -6,14 +6,14 @@ cube_t applytrans(cube_t, const char *);
6uint8_t transform_move(uint8_t, uint8_t); 6uint8_t transform_move(uint8_t, uint8_t);
7int64_t readmoves(const char *, size_t n, uint8_t [n]); 7int64_t readmoves(const char *, size_t n, uint8_t [n]);
8cube_t move(cube_t, uint8_t); 8cube_t move(cube_t, uint8_t);
9cube_t applymoves(cube_t, const char *); 9oriented_cube_t applymoves(oriented_cube_t, const char *);
10uint8_t readtrans(const char[static NISSY_SIZE_TRANSFORMATION]); 10uint8_t readtrans(const char[static NISSY_SIZE_TRANSFORMATION]);
11 11
12void run(void) { 12void run(void) {
13 char movestr[STRLENMAX], transtr[STRLENMAX], cubestr[STRLENMAX]; 13 char movestr[STRLENMAX], transtr[STRLENMAX], cubestr[STRLENMAX];
14 uint8_t t, moves[MAXMOVES]; 14 uint8_t t, moves[MAXMOVES];
15 int i, n; 15 int i, n;
16 cube_t cube; 16 oriented_cube_t cube;
17 17
18 fgets(transtr, STRLENMAX, stdin); 18 fgets(transtr, STRLENMAX, stdin);
19 fgets(movestr, STRLENMAX, stdin); 19 fgets(movestr, STRLENMAX, stdin);
@@ -22,7 +22,7 @@ void run(void) {
22 n = readmoves(movestr, MAXMOVES, moves); 22 n = readmoves(movestr, MAXMOVES, moves);
23 t = readtrans(transtr); 23 t = readtrans(transtr);
24 for (i = 0; i < n; i++) 24 for (i = 0; i < n; i++)
25 cube = move(cube, transform_move(moves[i], t)); 25 cube.cube = move(cube.cube, transform_move(moves[i], t));
26 26
27 writecube(cube, STRLENMAX, cubestr); 27 writecube(cube, STRLENMAX, cubestr);
28 printf("%s\n", cubestr); 28 printf("%s\n", cubestr);

Generated with cgit - Back to sebastiano.tronto.net