Project

General

Profile

« Previous | Next » 

Revision 358be403

Added by Leszek Koltunski almost 2 years ago

Optimize the solver.

View differences:

src/main/java/org/distorted/solvers/SolverMain.java
27 27
import org.distorted.main.R;
28 28
import org.distorted.screens.ScreenList;
29 29
import org.distorted.screens.RubikScreenSolver;
30
import org.distorted.solvers.cube3.RubikSolverSearch;
30 31

  
31 32
///////////////////////////////////////////////////////////////////////////////////////////////////
32 33

  
......
72 73
    {
73 74
    String result;
74 75

  
75
    if( !org.distorted.solvers.cube3.Search.prepare(mRes) )
76
      result= "Error 9";
77
    else
78
      {
79
      String objectPosition = prepareCube3position();
80
      result = org.distorted.solvers.cube3.Search.solution(objectPosition, 24, 20);
81
      }
76
    RubikSolverSearch.prepare(mRes);
77
    String objectPosition = prepareCube3position();
78
    result = RubikSolverSearch.solution(objectPosition, 24, 20);
82 79

  
83 80
    if (result.contains("Error"))
84 81
      {
......
207 204
    return objectString.toString();
208 205
    }
209 206

  
210
///////////////////////////////////////////////////////////////////////////////////////////////////
211

  
212
  private void interruptCube3()
213
    {
214
    org.distorted.solvers.cube3.Search.interrupt();
215
    }
216

  
217 207
///////////////////////////////////////////////////////////////////////////////////////////////////
218 208

  
219 209
  public void start()

Also available in: Unified diff