diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-22 16:12:21 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-22 16:12:21 +0200 |
| commit | bab22e1946a656088804b61cf765461b48744971 (patch) | |
| tree | 43ae3798e5c2f4fc63e68df72d134e742fcaf834 /src/core/moves.h | |
| parent | 93522effba2f200257141189de5925a23fca93b8 (diff) | |
| download | nissy-core-bab22e1946a656088804b61cf765461b48744971.tar.gz nissy-core-bab22e1946a656088804b61cf765461b48744971.zip | |
Update tests for oriented_cube_t
Diffstat (limited to 'src/core/moves.h')
| -rw-r--r-- | src/core/moves.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/moves.h b/src/core/moves.h index 8f91167..7e80946 100644 --- a/src/core/moves.h +++ b/src/core/moves.h | |||
| @@ -21,7 +21,7 @@ STATIC uint8_t inverse_move(uint8_t); | |||
| 21 | STATIC void sortparallel_moves(size_t n, uint8_t [n]); | 21 | STATIC void sortparallel_moves(size_t n, uint8_t [n]); |
| 22 | STATIC bool are_lastmoves_singlecw(size_t n, const uint8_t [n]); | 22 | STATIC bool are_lastmoves_singlecw(size_t n, const uint8_t [n]); |
| 23 | 23 | ||
| 24 | STATIC cube_t applymoves(cube_t, const char *); | 24 | STATIC oriented_cube_t applymoves(oriented_cube_t, const char *); |
| 25 | 25 | ||
| 26 | #define FOREACH_READMOVE(ARG_BUF, ARG_MOVE, ARG_C, ARG_MAX, \ | 26 | #define FOREACH_READMOVE(ARG_BUF, ARG_MOVE, ARG_C, ARG_MAX, \ |
| 27 | RET_ERROR, ARG_ACTION) \ | 27 | RET_ERROR, ARG_ACTION) \ |
| @@ -319,17 +319,17 @@ are_lastmoves_singlecw(size_t n, const uint8_t moves[n]) | |||
| 319 | return isbase(moves[n-1]) && (!two || isbase(moves[n-2])); | 319 | return isbase(moves[n-1]) && (!two || isbase(moves[n-2])); |
| 320 | } | 320 | } |
| 321 | 321 | ||
| 322 | STATIC cube_t | 322 | STATIC oriented_cube_t |
| 323 | applymoves(cube_t cube, const char *buf) | 323 | applymoves(oriented_cube_t cube, const char *buf) |
| 324 | { | 324 | { |
| 325 | int c; | 325 | int c; |
| 326 | uint8_t m; | 326 | uint8_t m; |
| 327 | 327 | ||
| 328 | DBG_ASSERT(isconsistent(cube), ZERO_CUBE, | 328 | DBG_ASSERT(isconsistent(cube), ZERO_ORIENTED_CUBE, |
| 329 | "move error: inconsistent cube\n"); | 329 | "move error: inconsistent cube\n"); |
| 330 | 330 | ||
| 331 | FOREACH_READMOVE(buf, m, c, -1, ZERO_CUBE, | 331 | FOREACH_READMOVE(buf, m, c, -1, ZERO_ORIENTED_CUBE, |
| 332 | cube = move(cube, m); | 332 | cube.cube = move(cube.cube, m); |
| 333 | ) | 333 | ) |
| 334 | 334 | ||
| 335 | return cube; | 335 | return cube; |
