Revision 873ce847
Added by Leszek Koltunski over 1 year ago
src/main/java/org/distorted/solvers/SolverCube3.java | ||
---|---|---|
12 | 12 |
import android.content.res.Resources; |
13 | 13 |
|
14 | 14 |
import org.distorted.main.R; |
15 |
import org.distorted.objectlib.helpers.OperatingSystemInterface; |
|
15 | 16 |
import org.distorted.screens.RubikScreenSolver; |
16 | 17 |
import org.distorted.objectlib.main.TwistyObject; |
17 |
import org.distorted.objectlib.solvers.cube3.SolverSearch;
|
|
18 |
import org.distorted.objectlib.kociemba.SolverSearch;
|
|
18 | 19 |
|
19 | 20 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
20 | 21 |
|
21 | 22 |
public class SolverCube3 |
22 | 23 |
{ |
23 | 24 |
private final Resources mRes; |
25 |
private final OperatingSystemInterface mOS; |
|
24 | 26 |
private final TwistyObject mObject; |
25 | 27 |
private int mColorID; |
26 | 28 |
|
... | ... | |
164 | 166 |
// PUBLIC API |
165 | 167 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
166 | 168 |
|
167 |
public SolverCube3(Resources res, TwistyObject object) |
|
169 |
public SolverCube3(OperatingSystemInterface os, Resources res, TwistyObject object)
|
|
168 | 170 |
{ |
169 | 171 |
mRes = res; |
172 |
mOS = os; |
|
170 | 173 |
mObject= object; |
171 | 174 |
} |
172 | 175 |
|
... | ... | |
176 | 179 |
{ |
177 | 180 |
String result; |
178 | 181 |
|
179 |
SolverSearch.prepare(mRes);
|
|
182 |
SolverSearch.prepare(mOS);
|
|
180 | 183 |
String objectPosition = preparePosition(); |
181 | 184 |
int check = checkPosition(objectPosition); |
182 | 185 |
|
src/main/java/org/distorted/solvers/SolverMain.java | ||
---|---|---|
76 | 76 |
|
77 | 77 |
if( mSignature==ObjectSignatures.CUBE_3 ) |
78 | 78 |
{ |
79 |
SolverCube3 solver = new SolverCube3(mRes,mObject); |
|
79 |
SolverCube3 solver = new SolverCube3(mOS,mRes,mObject);
|
|
80 | 80 |
solver.solve(screen); |
81 | 81 |
} |
82 | 82 |
else if( mSignature==ObjectSignatures.PDUO_2 ) |
Also available in: Unified diff
minor