Project

General

Profile

« Previous | Next » 

Revision 3fe7bcde

Added by Leszek Koltunski almost 2 years ago

Introduce ImplementedTablebasesList

View differences:

src/main/java/org/distorted/solvers/SolverPyraminxDuo.java
12 12
import android.content.res.Resources;
13 13

  
14 14
import org.distorted.main.R;
15
import org.distorted.objectlib.main.ObjectType;
15 16
import org.distorted.objectlib.main.TwistyObject;
16
import org.distorted.objectlib.tablebases.TablebasesPyraminxDuo;
17
import org.distorted.objectlib.tablebases.ImplementedTablebasesList;
18
import org.distorted.objectlib.tablebases.TablebasesAbstract;
17 19

  
18 20
///////////////////////////////////////////////////////////////////////////////////////////////////
19 21

  
......
34 36

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

  
37
  TablebasesPyraminxDuo mSolver;
39
  TablebasesAbstract mSolver;
38 40

  
39 41
///////////////////////////////////////////////////////////////////////////////////////////////////
40 42

  
......
287 289
    {
288 290
    if( mSolver==null )
289 291
      {
290
      mSolver = new TablebasesPyraminxDuo(res,org.distorted.objectlib.R.raw.pduo_2_tablebase);
292
      mSolver = ImplementedTablebasesList.createPacked(res,ObjectType.PDUO_2);
291 293
      }
292 294

  
293
    return mSolver.solution(index);
295
    return mSolver!=null ? mSolver.solution(index) : null;
294 296
    }
295 297
}  
296 298

  

Also available in: Unified diff