diff options
Diffstat (limited to '')
| -rw-r--r-- | src/cube.c | 28 |
1 files changed, 1 insertions, 27 deletions
| @@ -4,7 +4,6 @@ | |||
| 4 | 4 | ||
| 5 | static void fix_eorleoud(CubeArray *arr); | 5 | static void fix_eorleoud(CubeArray *arr); |
| 6 | static void fix_cofbcorl(CubeArray *arr); | 6 | static void fix_cofbcorl(CubeArray *arr); |
| 7 | static Cube fourval_to_cube(int eofb, int ep, int coud, int cp); | ||
| 8 | static void init_inverse(); | 7 | static void init_inverse(); |
| 9 | static bool read_invtables_file(); | 8 | static bool read_invtables_file(); |
| 10 | static bool write_invtables_file(); | 9 | static bool write_invtables_file(); |
| @@ -18,8 +17,6 @@ static uint16_t co_invtable[POW3TO7][FACTORIAL8]; | |||
| 18 | static uint16_t cp_invtable[FACTORIAL8]; | 17 | static uint16_t cp_invtable[FACTORIAL8]; |
| 19 | static uint16_t cpos_invtable[FACTORIAL6]; | 18 | static uint16_t cpos_invtable[FACTORIAL6]; |
| 20 | 19 | ||
| 21 | char *scrtypes[NSCRTYPES] = { "eo", "corners", "edges" }; | ||
| 22 | |||
| 23 | /* Functions implementation **************************************************/ | 20 | /* Functions implementation **************************************************/ |
| 24 | 21 | ||
| 25 | int | 22 | int |
| @@ -187,7 +184,7 @@ fix_cofbcorl(CubeArray *arr) | |||
| 187 | } | 184 | } |
| 188 | } | 185 | } |
| 189 | 186 | ||
| 190 | static Cube | 187 | Cube |
| 191 | fourval_to_cube(int eofb, int ep, int coud, int cp) | 188 | fourval_to_cube(int eofb, int ep, int coud, int cp) |
| 192 | { | 189 | { |
| 193 | CubeArray *arr; | 190 | CubeArray *arr; |
| @@ -544,29 +541,6 @@ print_cube(Cube cube) | |||
| 544 | printf("\n"); | 541 | printf("\n"); |
| 545 | } | 542 | } |
| 546 | 543 | ||
| 547 | Cube | ||
| 548 | random_cube(int scrt) | ||
| 549 | { | ||
| 550 | int ep, cp, eo, co; | ||
| 551 | |||
| 552 | ep = rand() % FACTORIAL12; | ||
| 553 | cp = rand() % FACTORIAL8; | ||
| 554 | eo = rand() % POW2TO11; | ||
| 555 | co = rand() % POW3TO7; | ||
| 556 | |||
| 557 | if (scrt == 0) { /* EO */ | ||
| 558 | eo = 0; | ||
| 559 | } else if (scrt == 1) { /* corners */ | ||
| 560 | eo = 0; | ||
| 561 | ep = 0; | ||
| 562 | } else if (scrt == 2) { /* edges */ | ||
| 563 | co = 0; | ||
| 564 | cp = 0; | ||
| 565 | } | ||
| 566 | |||
| 567 | return fourval_to_cube(eo, ep, co, cp); | ||
| 568 | } | ||
| 569 | |||
| 570 | Center | 544 | Center |
| 571 | what_center_at(Cube cube, Center c) | 545 | what_center_at(Cube cube, Center c) |
| 572 | { | 546 | { |
