diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-11-11 22:05:00 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-11-11 22:05:00 +0100 |
| commit | 4fb67201414169a2687f41c4056b2e284b4938cb (patch) | |
| tree | a68246e3e21435229541f83f485ab41cfb2ba08a /old/2021-02-18-piecefilter/src/cube.h | |
| parent | 3568412f8f230774d0d11d7ed1c897424f95d3ef (diff) | |
| download | nissy-4fb67201414169a2687f41c4056b2e284b4938cb.tar.gz nissy-4fb67201414169a2687f41c4056b2e284b4938cb.zip | |
Removed old files
Diffstat (limited to 'old/2021-02-18-piecefilter/src/cube.h')
| -rw-r--r-- | old/2021-02-18-piecefilter/src/cube.h | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/old/2021-02-18-piecefilter/src/cube.h b/old/2021-02-18-piecefilter/src/cube.h deleted file mode 100644 index 9b64a0c..0000000 --- a/old/2021-02-18-piecefilter/src/cube.h +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 1 | #ifndef CUBE_H | ||
| 2 | #define CUBE_H | ||
| 3 | |||
| 4 | #include <stdio.h> | ||
| 5 | #include <stdbool.h> | ||
| 6 | #include <stdint.h> | ||
| 7 | #include "utils.h" | ||
| 8 | |||
| 9 | typedef enum {U_center,D_center,R_center,L_center,F_center,B_center} Center; | ||
| 10 | typedef enum { UF, UL, UB, UR, DF, DL, DB, DR, FR, FL, BL, BR } Edge; | ||
| 11 | typedef enum { UFR, UFL, UBL, UBR, DFR, DFL, DBL, DBR } Corner; | ||
| 12 | |||
| 13 | typedef struct { | ||
| 14 | bool epose, eposs, eposm, eofb, eorl, eoud, cp, coud, cofb, corl, cpos; | ||
| 15 | } PieceFilter; | ||
| 16 | |||
| 17 | typedef struct { | ||
| 18 | uint16_t eofb, eorl, eoud, coud, cofb, corl, | ||
| 19 | epose, eposs, eposm, cp, cpos; | ||
| 20 | } Cube; | ||
| 21 | |||
| 22 | typedef struct { | ||
| 23 | int ep[12], eofb[12], eorl[12], eoud[12], | ||
| 24 | cp[8], coud[8], corl[8], cofb[8], cpos[6]; | ||
| 25 | } CubeArray; | ||
| 26 | |||
| 27 | |||
| 28 | extern PieceFilter fAll; | ||
| 29 | |||
| 30 | Cube blank_cube(); | ||
| 31 | /* Return axis (ud=0, rl=1, fb=0) of center c */ | ||
| 32 | int center_axis(int c); | ||
| 33 | /* Return slice (e=0, s=1, m=2) to which e belongs */ | ||
| 34 | int edge_slice(int e); | ||
| 35 | void cube_to_arrays(Cube cube, CubeArray *arr, PieceFilter f); | ||
| 36 | Cube arrays_to_cube(CubeArray arr, PieceFilter f); | ||
| 37 | bool equal(Cube c1, Cube c2); | ||
| 38 | bool is_solvable(Cube cube); | ||
| 39 | bool is_solved(Cube cube); | ||
| 40 | void print_cube(Cube cube); | ||
| 41 | Cube inverse_cube(Cube cube); | ||
| 42 | /* Use c2 as an alg on c1 */ | ||
| 43 | Cube compose_via_arrays(CubeArray c2, Cube c1, PieceFilter f); | ||
| 44 | |||
| 45 | #endif | ||
