Revision 696c5dd1
Added by Leszek Koltunski 2 days ago
src/main/java/org/distorted/phasedsolver/SolverActivity.java | ||
---|---|---|
22 | 22 |
|
23 | 23 |
import org.distorted.library.main.DistortedLibrary; |
24 | 24 |
import org.distorted.library.type.Static3D; |
25 |
import org.distorted.objectlib.algphases.Phase; |
|
26 |
import org.distorted.objectlib.algphases.PhaseCyclicOrie1; |
|
27 |
import org.distorted.objectlib.algphases.PhaseCyclicPerm2; |
|
28 |
import org.distorted.objectlib.algphases.PhaseNotCyclic; |
|
29 |
import org.distorted.objectlib.algphases.PhaseRegex; |
|
25 |
import org.distorted.objectlib.algsolvers.PhaseMitm; |
|
30 | 26 |
import org.distorted.objectlib.algsolvers.*; |
31 | 27 |
import org.distorted.objectlib.main.InitAssets; |
32 | 28 |
import org.distorted.objectlib.main.ObjectControl; |
... | ... | |
45 | 41 |
private SolvedObject mObject; |
46 | 42 |
private int[][] mMoveTable; |
47 | 43 |
private String mMoves; |
44 |
|
|
48 | 45 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
49 | 46 |
|
50 | 47 |
@Override |
... | ... | |
133 | 130 |
|
134 | 131 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
135 | 132 |
|
136 |
private void solve(PhasedSolver ps, int[] quats)
|
|
133 |
private void solve(SolverPhased ps, int[] quats)
|
|
137 | 134 |
{ |
138 | 135 |
int[][] sol = ps.solution(quats); |
139 | 136 |
int numPhases = sol.length; |
... | ... | |
229 | 226 |
String llCornersOrie = llco+" "+llco+" "+llco+" "+llco; |
230 | 227 |
String llCorners = llCornersPerm+" "+llCornersOrie; |
231 | 228 |
|
229 |
int[][] algsOrie = { {11,17,5,15,3,9},{3} }; |
|
230 |
int[][] algsPerm = { {5,6,3,9,5,8,3,11},{3} }; |
|
231 |
|
|
232 |
int[][] moveTable = mObject.getMoveTable(); |
|
233 |
MoveProviderAll all = new MoveProviderAll(moveTable); |
|
234 |
MoveProviderAlgs alO = new MoveProviderAlgs(algsOrie); |
|
235 |
MoveProviderAlgs alP = new MoveProviderAlgs(algsPerm); |
|
236 |
|
|
237 |
TargetProvider wcr = new TargetProviderAll(whiteCross); |
|
238 |
TargetProvider wco = new TargetProviderAll(whiteCorners); |
|
239 |
TargetProvider sla = new TargetProviderAll(secondLayer); |
|
240 |
TargetProvider oll = new TargetProviderOrie(mObject,14,1); |
|
241 |
|
|
232 | 242 |
Phase[] phases = |
233 | 243 |
{ |
234 |
new PhaseNotCyclic( mObject, whiteCross),
|
|
235 |
new PhaseNotCyclic( mObject, whiteCorners),
|
|
236 |
new PhaseNotCyclic( mObject, secondLayer),
|
|
237 |
new PhaseRegex( mObject, llEdges , yellowEdges ),
|
|
244 |
new PhaseMitm( mObject, all, wcr),
|
|
245 |
new PhaseMitm( mObject, all, wco),
|
|
246 |
new PhaseMitm( mObject, all, sla),
|
|
247 |
// new PhaseMitm( mObject, alO, oll),
|
|
238 | 248 |
// new PhaseRegex( mObject, llCorners, yellowCorners ), |
239 | 249 |
}; |
240 | 250 |
|
241 |
PhasedSolver ps = new PhasedSolver(mObject,phases);
|
|
251 |
SolverPhased ps = new SolverPhased(mObject,phases);
|
|
242 | 252 |
|
243 | 253 |
runOnUiThread(new Runnable() |
244 | 254 |
{ |
Also available in: Unified diff
Clean up everything.
Algorithmic MoveProviders do nto seem to work yet. (3x3 Beginner's OLL phase does not work)