Revision f5e5e7a3
Added by Leszek Koltunski over 1 year ago
src/main/java/org/distorted/solvers/SolverCube2.java | ||
---|---|---|
17 | 17 |
import org.distorted.objectlib.tablebases.ImplementedTablebasesList; |
18 | 18 |
import org.distorted.objectlib.tablebases.TablebaseHelpers; |
19 | 19 |
import org.distorted.objectlib.tablebases.TablebasesAbstract; |
20 |
import org.distorted.objectlib.tablebases.TablebasesCube2;
|
|
20 |
import org.distorted.objectlib.tablebases.TBCube2;
|
|
21 | 21 |
|
22 | 22 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
23 | 23 |
|
... | ... | |
191 | 191 |
int result1 = retCornerPermutation(perm,corners); |
192 | 192 |
if( result1<0 ) return result1; |
193 | 193 |
|
194 |
int[] perm7 = TablebasesCube2.shrinkPerm(perm);
|
|
194 |
int[] perm7 = TBCube2.shrinkPerm(perm);
|
|
195 | 195 |
int permNum = TablebaseHelpers.computePermutationNum(perm7); |
196 | 196 |
int[] twist = new int[8]; |
197 | 197 |
fillCornerTwists(twist,corners,perm); |
src/main/java/org/distorted/solvers/SolverPyraminx.java | ||
---|---|---|
17 | 17 |
import org.distorted.objectlib.tablebases.ImplementedTablebasesList; |
18 | 18 |
import org.distorted.objectlib.tablebases.TablebaseHelpers; |
19 | 19 |
import org.distorted.objectlib.tablebases.TablebasesAbstract; |
20 |
import org.distorted.objectlib.tablebases.TablebasesPyraminx;
|
|
20 |
import org.distorted.objectlib.tablebases.TBPyraminx;
|
|
21 | 21 |
|
22 | 22 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
23 | 23 |
|
... | ... | |
236 | 236 |
{ |
237 | 237 |
int pos = locateEdge(edges,edgeColors[i]); |
238 | 238 |
int twist = edgeTwist(edges[pos],edgeColors[i]); |
239 |
quats[i] = TablebasesPyraminx.EDGE_QUATS[pos][twist];
|
|
239 |
quats[i] = TBPyraminx.EDGE_QUATS[pos][twist];
|
|
240 | 240 |
} |
241 | 241 |
|
242 | 242 |
return quats; |
... | ... | |
380 | 380 |
|
381 | 381 |
int[] quats = computeEdgeQuats(edges,edgeColors); |
382 | 382 |
int[] permutation = new int[6]; |
383 |
TablebasesPyraminx.getEdgePermutation(permutation,quats,0);
|
|
383 |
TBPyraminx.getEdgePermutation(permutation,quats,0);
|
|
384 | 384 |
boolean even = TablebaseHelpers.permutationIsEven(permutation); |
385 | 385 |
if( !even ) return ERROR_TWO_EDGES; |
386 | 386 |
int[] edge_twist = new int[6]; |
387 |
TablebasesPyraminx.getEdgeTwist(edge_twist,quats,0);
|
|
387 |
TBPyraminx.getEdgeTwist(edge_twist,quats,0);
|
|
388 | 388 |
|
389 | 389 |
int totalEdgeTwist=0; |
390 | 390 |
for(int i=0; i<6; i++) totalEdgeTwist += edge_twist[i]; |
Also available in: Unified diff
Minor.