aboutsummaryrefslogtreecommitdiff
path: root/src/cube.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-09-20 21:48:04 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2023-09-20 21:48:04 +0200
commit99fabe8592a4022313b1cb0581881ee1bc6b1c99 (patch)
tree9f44681a5b54e39de85cf394dbbdd91c25fd97c4 /src/cube.h
parent7e702c3387d702374158c61ac6da4b3cb2452186 (diff)
downloadnissy-core-99fabe8592a4022313b1cb0581881ee1bc6b1c99.tar.gz
nissy-core-99fabe8592a4022313b1cb0581881ee1bc6b1c99.zip
Added tests for compose
Diffstat (limited to '')
-rw-r--r--src/cube.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/cube.h b/src/cube.h
index 836bb5d..e5434e3 100644
--- a/src/cube.h
+++ b/src/cube.h
@@ -1,9 +1,18 @@
1typedef enum { 1typedef enum {
2 U, U2, U3, D, D2, D3, 2 U = 0, U2, U3, D, D2, D3,
3 R, R2, R3, L, L2, L3, 3 R, R2, R3, L, L2, L3,
4 F, F2, F3, B, B2, B3 4 F, F2, F3, B, B2, B3
5} move_t; 5} move_t;
6 6
7typedef enum {
8 UF_i = 0, UL_i, UB_i, UR_i, DF_i, DL_i, DB_i, DR_i,
9 UF_m, UL_m, UB_m, UR_m, DF_m, DL_m, DB_m, DR_m,
10 RU_i, RF_i, RD_i, RB_i, LU_i, LF_i, LD_i, LB_i,
11 RU_m, RF_m, RD_m, RB_m, LU_m, LF_m, LD_m, LB_m,
12 FU_i, FR_i, FD_i, FL_i, BU_i, BR_i, BD_i, BL_i,
13 FU_m, FR_m, FD_m, FL_m, BU_m, BR_m, BD_m, BL_m
14} trans_t;
15
7typedef struct { 16typedef struct {
8 uint8_t c[8]; 17 uint8_t c[8];
9 uint8_t e[12]; 18 uint8_t e[12];
@@ -51,3 +60,5 @@ void writemoves(move_t *, int, char *);
51 60
52cube_t move(cube_t, move_t); 61cube_t move(cube_t, move_t);
53cube_t inverse(cube_t); 62cube_t inverse(cube_t);
63cube_t compose(cube_t, cube_t);
64cube_t transform(cube_t, trans_t);

Generated with cgit - Back to sebastiano.tronto.net