diff options
Diffstat (limited to '')
| -rw-r--r-- | src/cube.h | 13 |
1 files changed, 12 insertions, 1 deletions
| @@ -1,9 +1,18 @@ | |||
| 1 | typedef enum { | 1 | typedef 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 | ||
| 7 | typedef 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 | |||
| 7 | typedef struct { | 16 | typedef 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 | ||
| 52 | cube_t move(cube_t, move_t); | 61 | cube_t move(cube_t, move_t); |
| 53 | cube_t inverse(cube_t); | 62 | cube_t inverse(cube_t); |
| 63 | cube_t compose(cube_t, cube_t); | ||
| 64 | cube_t transform(cube_t, trans_t); | ||
