diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/moves.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/moves.c b/src/moves.c index 25ce779..bb749a5 100644 --- a/src/moves.c +++ b/src/moves.c | |||
| @@ -11,50 +11,50 @@ static bool write_mtables_file(); | |||
| 11 | /* Every move is translated to a an <U, x, y> alg before filling the | 11 | /* Every move is translated to a an <U, x, y> alg before filling the |
| 12 | transition tables, see init_moves() */ | 12 | transition tables, see init_moves() */ |
| 13 | 13 | ||
| 14 | static int edge_cycle[NMOVES][12] = | 14 | static int edge_cycle[NMOVES][12] = |
| 15 | { | 15 | { |
| 16 | [U] = { UR, UF, UL, UB, DF, DL, DB, DR, FR, FL, BL, BR }, | 16 | [U] = { UR, UF, UL, UB, DF, DL, DB, DR, FR, FL, BL, BR }, |
| 17 | [x] = { DF, FL, UF, FR, DB, BL, UB, BR, DR, DL, UL, UR }, | 17 | [x] = { DF, FL, UF, FR, DB, BL, UB, BR, DR, DL, UL, UR }, |
| 18 | [y] = { UR, UF, UL, UB, DR, DF, DL, DB, BR, FR, FL, BL } | 18 | [y] = { UR, UF, UL, UB, DR, DF, DL, DB, BR, FR, FL, BL } |
| 19 | }; | 19 | }; |
| 20 | 20 | ||
| 21 | static int corner_cycle[NMOVES][8] = | 21 | static int corner_cycle[NMOVES][8] = |
| 22 | { | 22 | { |
| 23 | [U] = { UBR, UFR, UFL, UBL, DFR, DFL, DBL, DBR }, | 23 | [U] = { UBR, UFR, UFL, UBL, DFR, DFL, DBL, DBR }, |
| 24 | [x] = { DFR, DFL, UFL, UFR, DBR, DBL, UBL, UBR }, | 24 | [x] = { DFR, DFL, UFL, UFR, DBR, DBL, UBL, UBR }, |
| 25 | [y] = { UBR, UFR, UFL, UBL, DBR, DFR, DFL, DBL } | 25 | [y] = { UBR, UFR, UFL, UBL, DBR, DFR, DFL, DBL } |
| 26 | }; | 26 | }; |
| 27 | 27 | ||
| 28 | static int center_cycle[NMOVES][6] = | 28 | static int center_cycle[NMOVES][6] = |
| 29 | { | 29 | { |
| 30 | [x] = { F_center, B_center, R_center, L_center, D_center, U_center }, | 30 | [x] = { F_center, B_center, R_center, L_center, D_center, U_center }, |
| 31 | [y] = { U_center, D_center, B_center, F_center, R_center, L_center } | 31 | [y] = { U_center, D_center, B_center, F_center, R_center, L_center } |
| 32 | }; | 32 | }; |
| 33 | 33 | ||
| 34 | static int eofb_flipped[NMOVES][12] = { | 34 | static int eofb_flipped[NMOVES][12] = { |
| 35 | [x] = { [UF] = 1, [UB] = 1, [DF] = 1, [DB] = 1 }, | 35 | [x] = { [UF] = 1, [UB] = 1, [DF] = 1, [DB] = 1 }, |
| 36 | [y] = { [FR] = 1, [FL] = 1, [BL] = 1, [BR] = 1 } | 36 | [y] = { [FR] = 1, [FL] = 1, [BL] = 1, [BR] = 1 } |
| 37 | }; | 37 | }; |
| 38 | 38 | ||
| 39 | static int eorl_flipped[NMOVES][12] = { | 39 | static int eorl_flipped[NMOVES][12] = { |
| 40 | [x] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, | 40 | [x] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, |
| 41 | [y] = { [FR] = 1, [FL] = 1, [BL] = 1, [BR] = 1 } | 41 | [y] = { [FR] = 1, [FL] = 1, [BL] = 1, [BR] = 1 } |
| 42 | }; | 42 | }; |
| 43 | 43 | ||
| 44 | static int eoud_flipped[NMOVES][12] = { | 44 | static int eoud_flipped[NMOVES][12] = { |
| 45 | [U] = { [UF] = 1, [UL] = 1, [UB] = 1, [UR] = 1 }, | 45 | [U] = { [UF] = 1, [UL] = 1, [UB] = 1, [UR] = 1 }, |
| 46 | [x] = { [UF] = 1, [UB] = 1, [DF] = 1, [DB] = 1 }, | 46 | [x] = { [UF] = 1, [UB] = 1, [DF] = 1, [DB] = 1 }, |
| 47 | [y] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } | 47 | [y] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } |
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | static int coud_flipped[NMOVES][8] = { | 50 | static int coud_flipped[NMOVES][8] = { |
| 51 | [x] = { | 51 | [x] = { |
| 52 | [UFR] = 2, [UBR] = 1, [UFL] = 1, [UBL] = 2, | 52 | [UFR] = 2, [UBR] = 1, [UFL] = 1, [UBL] = 2, |
| 53 | [DBR] = 2, [DFR] = 1, [DBL] = 1, [DFL] = 2 | 53 | [DBR] = 2, [DFR] = 1, [DBL] = 1, [DFL] = 2 |
| 54 | } | 54 | } |
| 55 | }; | 55 | }; |
| 56 | 56 | ||
| 57 | static int corl_flipped[NMOVES][8] = { | 57 | static int corl_flipped[NMOVES][8] = { |
| 58 | [U] = { [UFR] = 1, [UBR] = 2, [UBL] = 1, [UFL] = 2 }, | 58 | [U] = { [UFR] = 1, [UBR] = 2, [UBL] = 1, [UFL] = 2 }, |
| 59 | [y] = { | 59 | [y] = { |
| 60 | [UFR] = 1, [UBR] = 2, [UBL] = 1, [UFL] = 2, | 60 | [UFR] = 1, [UBR] = 2, [UBL] = 1, [UFL] = 2, |
| @@ -62,7 +62,7 @@ static int corl_flipped[NMOVES][8] = { | |||
| 62 | } | 62 | } |
| 63 | }; | 63 | }; |
| 64 | 64 | ||
| 65 | static int cofb_flipped[NMOVES][8] = { | 65 | static int cofb_flipped[NMOVES][8] = { |
| 66 | [U] = { [UFR] = 2, [UBR] = 1, [UBL] = 2, [UFL] = 1 }, | 66 | [U] = { [UFR] = 2, [UBR] = 1, [UBL] = 2, [UFL] = 1 }, |
| 67 | [x] = { | 67 | [x] = { |
| 68 | [UFR] = 1, [UBR] = 2, [UBL] = 1, [UFL] = 2, | 68 | [UFR] = 1, [UBR] = 2, [UBL] = 1, [UFL] = 2, |
