Project

General

Profile

« Previous | Next » 

Revision ca5260c2

Added by Leszek Koltunski almost 2 years ago

Progress with the Diamond Skewb solver.

View differences:

src/main/java/org/distorted/solvers/SolverSkewbDiamond.java
134 134
      {
135 135
      int t= twist[i];
136 136
      if( t==1 || t==3 ) return -1;
137
      if( t==2 ) total++;
138
      total *= 2;
137

  
138
      if( i<5 )
139
        {
140
        if( t==2 ) total++;
141
        total *= 2;
142
        }
139 143
      }
140 144

  
141 145
    return total;
......
367 371
    int corners_perm_num = TablebaseHelpers.computeEvenPermutationNum(corners_perm);
368 372
    int centers_perm_num = TablebaseHelpers.computeEvenPermutationNum(free_centers_perm);
369 373

  
370
    return centers_perm_num + 12*(totalTwist + 128*corners_perm_num);
374
    return centers_perm_num + 12*(totalTwist + 32*corners_perm_num);
371 375
    }
372 376

  
373 377
///////////////////////////////////////////////////////////////////////////////////////////////////
......
482 486
    if( mSolver==null )
483 487
      {
484 488
      mSolver = ImplementedTablebasesList.createUnpacked(ObjectType.DIAM_2);
485
     // if( mSolver!=null ) mSolver.createTablebase();
489
      if( mSolver!=null ) mSolver.createTablebase();
486 490
      }
487 491

  
488 492
    return mSolver!=null ? mSolver.solution(index) : null;

Also available in: Unified diff