diff options
Diffstat (limited to 'old/2021-02-18-piecefilter/src/moves.h')
| -rw-r--r-- | old/2021-02-18-piecefilter/src/moves.h | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/old/2021-02-18-piecefilter/src/moves.h b/old/2021-02-18-piecefilter/src/moves.h deleted file mode 100644 index 9ccf6e4..0000000 --- a/old/2021-02-18-piecefilter/src/moves.h +++ /dev/null | |||
| @@ -1,46 +0,0 @@ | |||
| 1 | #ifndef MOVES_H | ||
| 2 | #define MOVES_H | ||
| 3 | |||
| 4 | #include <stdio.h> | ||
| 5 | #include <stdbool.h> | ||
| 6 | #include <stdint.h> | ||
| 7 | #include "cube.h" | ||
| 8 | #include "utils.h" | ||
| 9 | |||
| 10 | #define NMOVES (z3+1) | ||
| 11 | |||
| 12 | typedef enum { | ||
| 13 | NULLMOVE, | ||
| 14 | U, U2, U3, D, D2, D3, R, R2, R3, L, L2, L3, F, F2, F3, B, B2, B3, | ||
| 15 | Uw, Uw2, Uw3, Dw, Dw2, Dw3, Rw, Rw2, Rw3, | ||
| 16 | Lw, Lw2, Lw3, Fw, Fw2, Fw3, Bw, Bw2, Bw3, | ||
| 17 | M, M2, M3, S, S2, S3, E, E2, E3, | ||
| 18 | x, x2, x3, y, y2, y3, z, z2, z3, | ||
| 19 | } Move; | ||
| 20 | |||
| 21 | /* An alg is an array of "NissMoves", which can be on normal or on inverse. */ | ||
| 22 | typedef struct { bool inverse; Move m; } NissMove; | ||
| 23 | |||
| 24 | /* Movesets */ | ||
| 25 | extern bool standard_moveset[NMOVES]; | ||
| 26 | |||
| 27 | extern bool commute[NMOVES][NMOVES]; | ||
| 28 | extern bool possible_next[NMOVES][NMOVES][NMOVES]; | ||
| 29 | extern Move inverse[NMOVES]; | ||
| 30 | |||
| 31 | bool is_solve_up_to_reorient(Cube cube); | ||
| 32 | int copy_alg(NissMove *src, NissMove *dest); /*return number of moves copied */ | ||
| 33 | void print_moves(NissMove *alg); | ||
| 34 | int read_moves(char *str, NissMove *alg, int n); /* reads at most n moves */ | ||
| 35 | void cleanup(NissMove *src, int n); /* rewrites using basic moves, at most n */ | ||
| 36 | Cube move_cube(Move m, Cube cube); | ||
| 37 | /* I might want to replace this with two versions, one that uses PieceFilter */ | ||
| 38 | Cube apply_alg(NissMove *alg, Cube cube); | ||
| 39 | |||
| 40 | /* Merge the following two? | ||
| 41 | always in this order */ | ||
| 42 | void init_ttables(bool read, bool write); | ||
| 43 | void init_aux_tables(); | ||
| 44 | |||
| 45 | |||
| 46 | #endif | ||
