Project

General

Profile

« Previous | Next » 

Revision 39b813a1

Added by Leszek Koltunski almost 2 years ago

Read TB from file.

View differences:

src/main/java/org/distorted/solvers/SolverPyraminxDuo.java
34 34

  
35 35
  private static final int ERROR_CORNERS_CANNOT   = -11;
36 36

  
37
  TablebasesPyraminxDuo mSolver;
38

  
37 39
///////////////////////////////////////////////////////////////////////////////////////////////////
38 40

  
39 41
  private boolean cornerEqual(int[] corner, int c1, int c2, int c3)
......
282 284

  
283 285
  public int[][] solution(int index, Resources res)
284 286
    {
285
    TablebasesPyraminxDuo tb = new TablebasesPyraminxDuo();
286
    tb.createTablebase();
287
    return tb.solution(index);
287
    if( mSolver==null )
288
      {
289
      mSolver = new TablebasesPyraminxDuo(res,org.distorted.objectlib.R.raw.pduo_2_tablebase);
290
      }
291

  
292
    return mSolver.solution(index);
288 293
    }
289 294
}  
290 295

  

Also available in: Unified diff