Project

General

Profile

« Previous | Next » 

Revision 7b3d2515

Added by Leszek Koltunski 12 months ago

Fix Dino6 solver.

View differences:

src/main/java/org/distorted/objectlib/tablebases/TBDino.java
246 246
    }
247 247

  
248 248
///////////////////////////////////////////////////////////////////////////////////////////////////
249
// in-place!
250 249

  
251 250
  public static int[] getPermFromQuats(int[] quats)
252 251
    {
252
    int[] perm = new int[12];
253

  
253 254
    for(int i=0; i<12; i++)
254 255
      {
255 256
      int[] Q = QUATS[i];
......
258 259
      for(int j=0; j<12; j++)
259 260
        if( Q[j]==quat )
260 261
          {
261
          quats[i] = j;
262
          perm[i] = j;
262 263
          break;
263 264
          }
264 265
      }
265 266

  
266
    return quats;
267
    return perm;
267 268
    }
268 269

  
269 270
///////////////////////////////////////////////////////////////////////////////////////////////////
src/main/java/org/distorted/objectlib/tablebases/TBDino4.java
229 229

  
230 230
  private static int[] partitionFromQuats(int[] quats)
231 231
    {
232
    int[] perm = new int[12];
233
    System.arraycopy(quats, 0, perm, 0, 12);
234
    TBDino.getPermFromQuats(perm);
235

  
232
    int[] perm = TBDino.getPermFromQuats(quats);
236 233
    int[] part = new int[12];
237 234

  
238 235
    for(int i=0; i<4; i++)

Also available in: Unified diff