From 48cd8b6b1779f34ba0507cb697492de83c4e9da8 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 27 Feb 2022 15:36:02 +0100 Subject: Moved random_cube() from cube.c to commands.c and fixed a bug in corners only and edges only scrambles. Added fmc scrambles (with R'U'F). Updated manpage for scramble and cleanup. --- src/cube.c | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'src/cube.c') diff --git a/src/cube.c b/src/cube.c index 3a6234d..803fefd 100644 --- a/src/cube.c +++ b/src/cube.c @@ -4,7 +4,6 @@ static void fix_eorleoud(CubeArray *arr); static void fix_cofbcorl(CubeArray *arr); -static Cube fourval_to_cube(int eofb, int ep, int coud, int cp); static void init_inverse(); static bool read_invtables_file(); static bool write_invtables_file(); @@ -18,8 +17,6 @@ static uint16_t co_invtable[POW3TO7][FACTORIAL8]; static uint16_t cp_invtable[FACTORIAL8]; static uint16_t cpos_invtable[FACTORIAL6]; -char *scrtypes[NSCRTYPES] = { "eo", "corners", "edges" }; - /* Functions implementation **************************************************/ int @@ -187,7 +184,7 @@ fix_cofbcorl(CubeArray *arr) } } -static Cube +Cube fourval_to_cube(int eofb, int ep, int coud, int cp) { CubeArray *arr; @@ -544,29 +541,6 @@ print_cube(Cube cube) printf("\n"); } -Cube -random_cube(int scrt) -{ - int ep, cp, eo, co; - - ep = rand() % FACTORIAL12; - cp = rand() % FACTORIAL8; - eo = rand() % POW2TO11; - co = rand() % POW3TO7; - - if (scrt == 0) { /* EO */ - eo = 0; - } else if (scrt == 1) { /* corners */ - eo = 0; - ep = 0; - } else if (scrt == 2) { /* edges */ - co = 0; - cp = 0; - } - - return fourval_to_cube(eo, ep, co, cp); -} - Center what_center_at(Cube cube, Center c) { -- cgit v1.3