From 1a90075f672a442cafa35c1cccbb6cf026c3980e Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sat, 13 Nov 2021 17:13:24 +0100 Subject: Fixed a problem with htr-drud coordinates. The corresponding pruning table also changed, hopefully the new one is correct. --- src/cube.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'src/cube.c') diff --git a/src/cube.c b/src/cube.c index 06c8b8c..056e571 100644 --- a/src/cube.c +++ b/src/cube.c @@ -1,13 +1,8 @@ #include "cube.h" -/* Local functions **********************************************************/ - -static int array_ep_to_epos(int *ep, int *eps_solved); -static int epos_from_arrays(int *epos, int *ep); - -/* Local functions implementation ********************************************/ +/* Public functions implementation *******************************************/ -static int +int array_ep_to_epos(int *ep, int *ss) { int epos[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -26,17 +21,9 @@ array_ep_to_epos(int *ep, int *ss) for (i = 0; i < 4; i++) swap(&epos[ss[i]], &epos[i+8]); - return epos_from_arrays(epos, eps); + return 24 * subset_to_index(epos, 12, 4) + perm_to_index(eps, 4); } -static int -epos_from_arrays(int *epos, int *ep) -{ - return FACTORIAL4 * subset_to_index(epos,12,4) + perm_to_index(ep,4); -} - -/* Public functions implementation *******************************************/ - Cube arrays_to_cube(CubeArray *arr, PieceFilter f) { -- cgit v1.3