diff options
Diffstat (limited to '')
| -rw-r--r-- | old/2020-unknown-date/pieces.h | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/old/2020-unknown-date/pieces.h b/old/2020-unknown-date/pieces.h deleted file mode 100644 index dbdd740..0000000 --- a/old/2020-unknown-date/pieces.h +++ /dev/null | |||
| @@ -1,59 +0,0 @@ | |||
| 1 | /* Moves and other things */ | ||
| 2 | |||
| 3 | #ifndef PIECES_H | ||
| 4 | #define PIECES_H | ||
| 5 | |||
| 6 | typedef enum { | ||
| 7 | U, U2, U3, D, D2, D3, R, R2, R3, L, L2, L3, F, F2, F3, B, B2, B3, | ||
| 8 | Uw, Uw2, Uw3, Dw, Dw2, Dw3, Rw, Rw2, Rw3, | ||
| 9 | Lw, Lw2, Lw3, Fw, Fw2, Fw3, Bw, Bw2, Bw3, | ||
| 10 | M, M2, M3, S, S2, S3, E, E2, E3, | ||
| 11 | X, X2, X3, Y, Y2, Y3, Z, Z2, Z3, | ||
| 12 | NULLMOVE | ||
| 13 | } Move; | ||
| 14 | typedef enum { | ||
| 15 | U_center, D_center, R_center, L_center, F_center, B_center | ||
| 16 | } Center; | ||
| 17 | typedef enum { UF, UL, UB, UR, DF, DL, DB, DR, FR, FL, BL, BR } Edge; | ||
| 18 | typedef enum { UFR, UFL, UBL, UBR, DFR, DFL, DBL, DBR } Corner; | ||
| 19 | |||
| 20 | /* Arrays for strings of pieces and moves */ | ||
| 21 | extern char edge_string[12][5]; | ||
| 22 | extern char corner_string[8][5]; | ||
| 23 | extern char center_string[6][5]; | ||
| 24 | extern char move_string[NULLMOVE+1][5]; | ||
| 25 | |||
| 26 | /* Three big arrays that determine the movement of edges, corners and | ||
| 27 | * centers for some of the basic moves. Yes, one can be much more elegant and | ||
| 28 | * write much fewer lines. But then things get less elegant somewhere else. */ | ||
| 29 | extern int edge_cycle[NULLMOVE+1][12]; | ||
| 30 | extern int corner_cycle[NULLMOVE+1][8]; | ||
| 31 | extern int center_cycle[NULLMOVE+1][6]; | ||
| 32 | |||
| 33 | /* Representation of the cube */ | ||
| 34 | typedef struct { | ||
| 35 | /* Edge orientation */ | ||
| 36 | int eofb; | ||
| 37 | int eorl; | ||
| 38 | int eoud; | ||
| 39 | |||
| 40 | /* Corner orientation */ | ||
| 41 | int coud; | ||
| 42 | int cofb; | ||
| 43 | int corl; | ||
| 44 | |||
| 45 | /* Position of M/E/S slice edges */ | ||
| 46 | /* TODO: keep in mind that the 4! positions with edges in correct slice | ||
| 47 | * must be the first 4! indeces */ | ||
| 48 | int epose; | ||
| 49 | int eposs; | ||
| 50 | int eposm; | ||
| 51 | |||
| 52 | /* Permutation of corners */ | ||
| 53 | int cp; | ||
| 54 | |||
| 55 | /* Position of centers */ | ||
| 56 | int centerpos; | ||
| 57 | } Cube; | ||
| 58 | |||
| 59 | #endif | ||
