1
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
2
|
// Copyright 2023 Leszek Koltunski //
|
3
|
// //
|
4
|
// This file is part of Magic Cube. //
|
5
|
// //
|
6
|
// Magic Cube is proprietary software licensed under an EULA which you should have received //
|
7
|
// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html //
|
8
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
9
|
|
10
|
package org.distorted.solvers;
|
11
|
|
12
|
import android.content.res.Resources;
|
13
|
|
14
|
import org.distorted.main.R;
|
15
|
import org.distorted.objectlib.helpers.OperatingSystemInterface;
|
16
|
import org.distorted.objectlib.main.ObjectSignatures;
|
17
|
import org.distorted.objectlib.main.TwistyObject;
|
18
|
import org.distorted.objectlib.tablebases.ImplementedTablebasesList;
|
19
|
import org.distorted.objectlib.tablebases.TablebaseHelpers;
|
20
|
import org.distorted.objectlib.tablebases.TablebasesAbstract;
|
21
|
|
22
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
23
|
|
24
|
public class SolverSkewbDiamond extends SolverTablebase
|
25
|
{
|
26
|
private static final int ERROR_CORNER_FR_MISSING = -1;
|
27
|
private static final int ERROR_CORNER_BR_MISSING = -2;
|
28
|
private static final int ERROR_CORNER_BL_MISSING = -3;
|
29
|
private static final int ERROR_CORNER_FL_MISSING = -4;
|
30
|
private static final int ERROR_CORNER_TO_MISSING = -5;
|
31
|
private static final int ERROR_CORNER_BO_MISSING = -6;
|
32
|
|
33
|
private static final int ERROR_CENTER_0_MISSING = -7;
|
34
|
private static final int ERROR_CENTER_1_MISSING = -8;
|
35
|
private static final int ERROR_CENTER_2_MISSING = -9;
|
36
|
private static final int ERROR_CENTER_3_MISSING = -10;
|
37
|
private static final int ERROR_CENTER_4_MISSING = -11;
|
38
|
private static final int ERROR_CENTER_5_MISSING = -12;
|
39
|
private static final int ERROR_CENTER_6_MISSING = -13;
|
40
|
private static final int ERROR_CENTER_7_MISSING = -14;
|
41
|
|
42
|
private static final int ERROR_TWO_CORNERS = -15;
|
43
|
private static final int ERROR_TWO_CENTERS = -16;
|
44
|
private static final int ERROR_CORNER_TWIST = -17;
|
45
|
private static final int ERROR_CORNERS_CANNOT = -18;
|
46
|
|
47
|
private TablebasesAbstract mSolver;
|
48
|
private final int[] mFaceColors;
|
49
|
|
50
|
private static final int[] FREE_CENTERS = {0,2,5,7};
|
51
|
|
52
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
53
|
|
54
|
public SolverSkewbDiamond(OperatingSystemInterface os, Resources res, TwistyObject object)
|
55
|
{
|
56
|
super(os,res,object);
|
57
|
mFaceColors = new int[8];
|
58
|
}
|
59
|
|
60
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
61
|
|
62
|
private int retCorner(int[][] corners, int c1, int c2)
|
63
|
{
|
64
|
for(int i=0; i<6; i++)
|
65
|
{
|
66
|
int[] cor = corners[i];
|
67
|
int twist = retCornerTwist(cor,c1,c2);
|
68
|
if( twist>=0 ) return i;
|
69
|
}
|
70
|
|
71
|
return -1;
|
72
|
}
|
73
|
|
74
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
75
|
|
76
|
private int[] getCornersPermutation(int[][] corners)
|
77
|
{
|
78
|
int[] perm = new int[6];
|
79
|
|
80
|
perm[0] = retCorner(corners,mFaceColors[1],mFaceColors[4]);
|
81
|
perm[1] = retCorner(corners,mFaceColors[1],mFaceColors[6]);
|
82
|
perm[2] = retCorner(corners,mFaceColors[3],mFaceColors[6]);
|
83
|
perm[3] = retCorner(corners,mFaceColors[3],mFaceColors[4]);
|
84
|
perm[4] = retCorner(corners,mFaceColors[1],mFaceColors[3]);
|
85
|
perm[5] = retCorner(corners,mFaceColors[4],mFaceColors[6]);
|
86
|
|
87
|
return perm;
|
88
|
}
|
89
|
|
90
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
91
|
|
92
|
private int computeCornerTwist(int[] corner, int color )
|
93
|
{
|
94
|
if( corner[3]==color ) return 0;
|
95
|
if( corner[2]==color ) return 1;
|
96
|
if( corner[1]==color ) return 2;
|
97
|
if( corner[0]==color ) return 3;
|
98
|
|
99
|
return -1;
|
100
|
}
|
101
|
|
102
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
103
|
|
104
|
private int[] getCornersTwist(int[] corners_perm, int[][] corners)
|
105
|
{
|
106
|
int[] twist = new int[6];
|
107
|
|
108
|
twist[0] = computeCornerTwist( corners[corners_perm[0]], mFaceColors[1] );
|
109
|
twist[1] = computeCornerTwist( corners[corners_perm[1]], mFaceColors[1] );
|
110
|
twist[2] = computeCornerTwist( corners[corners_perm[2]], mFaceColors[3] );
|
111
|
twist[3] = computeCornerTwist( corners[corners_perm[3]], mFaceColors[3] );
|
112
|
twist[4] = computeCornerTwist( corners[corners_perm[4]], mFaceColors[1] );
|
113
|
twist[5] = computeCornerTwist( corners[corners_perm[5]], mFaceColors[4] );
|
114
|
|
115
|
return twist;
|
116
|
}
|
117
|
|
118
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
119
|
|
120
|
private int retCenter(int color, int[] centers)
|
121
|
{
|
122
|
for(int i=0; i<4; i++ )
|
123
|
if( centers[FREE_CENTERS[i]]==color ) return i;
|
124
|
|
125
|
return -1;
|
126
|
}
|
127
|
|
128
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
129
|
|
130
|
private int[] getFreeCentersPermutation(int[] centers)
|
131
|
{
|
132
|
int[] perm = new int[4];
|
133
|
|
134
|
for(int i=0; i<4; i++ )
|
135
|
perm[i] = retCenter(mFaceColors[FREE_CENTERS[i]],centers);
|
136
|
|
137
|
return perm;
|
138
|
}
|
139
|
|
140
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
141
|
|
142
|
private int getTotalTwist(int[] twist)
|
143
|
{
|
144
|
int total = 0;
|
145
|
|
146
|
for(int i=0; i<6; i++)
|
147
|
{
|
148
|
int t= twist[i];
|
149
|
if( t==1 || t==3 ) return -1;
|
150
|
if( i<5 && t==2 ) total+=(1<<i);
|
151
|
}
|
152
|
|
153
|
return total;
|
154
|
}
|
155
|
|
156
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
157
|
|
158
|
private int retCornerTwist(int[] corner, int c1, int c2)
|
159
|
{
|
160
|
if( corner[0]==c1 && corner[2]==c2 ) return 1;
|
161
|
if( corner[1]==c1 && corner[3]==c2 ) return 2;
|
162
|
if( corner[2]==c1 && corner[0]==c2 ) return 3;
|
163
|
if( corner[3]==c1 && corner[1]==c2 ) return 0;
|
164
|
|
165
|
return -1;
|
166
|
}
|
167
|
|
168
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
169
|
|
170
|
private int figureOutColor(int[][] corners, int c1, int c2)
|
171
|
{
|
172
|
for(int i=0; i<6; i++)
|
173
|
{
|
174
|
int[] cor = corners[i];
|
175
|
int twist = retCornerTwist(cor,c1,c2);
|
176
|
if( twist>=0 ) return cor[twist];
|
177
|
}
|
178
|
|
179
|
return -1;
|
180
|
}
|
181
|
|
182
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
183
|
// We only move the UR, UR, DR & DB faces --> those centers are fixed and determine the colors of
|
184
|
// the faces.
|
185
|
|
186
|
private int figureOutFaceColors(int[] output, int[] centers, int[][] corners)
|
187
|
{
|
188
|
output[1] = centers[1];
|
189
|
output[3] = centers[3];
|
190
|
output[4] = centers[4];
|
191
|
output[6] = centers[6];
|
192
|
|
193
|
int color01 = figureOutColor(corners,output[4],output[1]);
|
194
|
if( color01<0 ) return ERROR_CORNER_FR_MISSING;
|
195
|
int color02 = figureOutColor(corners,output[3],output[4]);
|
196
|
if( color02<0 ) return ERROR_CORNER_FL_MISSING;
|
197
|
int color03 = figureOutColor(corners,output[1],output[3]);
|
198
|
if( color03<0 ) return ERROR_CORNER_TO_MISSING;
|
199
|
if( color01!=color02 || color01!=color03 ) return ERROR_CORNERS_CANNOT;
|
200
|
output[0] = color01;
|
201
|
|
202
|
int color21 = figureOutColor(corners,output[1],output[6]);
|
203
|
if( color21<0 ) return ERROR_CORNER_BR_MISSING;
|
204
|
int color22 = figureOutColor(corners,output[6],output[3]);
|
205
|
if( color22<0 ) return ERROR_CORNER_BL_MISSING;
|
206
|
int color23 = figureOutColor(corners,output[3],output[1]);
|
207
|
if( color23<0 ) return ERROR_CORNER_TO_MISSING;
|
208
|
if( color21!=color22 || color21!=color23 ) return ERROR_CORNERS_CANNOT;
|
209
|
output[2] = color21;
|
210
|
|
211
|
int color51 = figureOutColor(corners,output[1],output[4]);
|
212
|
if( color51<0 ) return ERROR_CORNER_FR_MISSING;
|
213
|
int color52 = figureOutColor(corners,output[6],output[1]);
|
214
|
if( color52<0 ) return ERROR_CORNER_BR_MISSING;
|
215
|
int color53 = figureOutColor(corners,output[4],output[6]);
|
216
|
if( color53<0 ) return ERROR_CORNER_BO_MISSING;
|
217
|
if( color51!=color52 || color51!=color53 ) return ERROR_CORNERS_CANNOT;
|
218
|
output[5] = color51;
|
219
|
|
220
|
int color71 = figureOutColor(corners,output[3],output[6]);
|
221
|
if( color71<0 ) return ERROR_CORNER_BL_MISSING;
|
222
|
int color72 = figureOutColor(corners,output[4],output[3]);
|
223
|
if( color72<0 ) return ERROR_CORNER_FL_MISSING;
|
224
|
int color73 = figureOutColor(corners,output[6],output[4]);
|
225
|
if( color73<0 ) return ERROR_CORNER_BO_MISSING;
|
226
|
if( color71!=color72 || color71!=color73 ) return ERROR_CORNERS_CANNOT;
|
227
|
output[7] = color71;
|
228
|
|
229
|
return 0;
|
230
|
}
|
231
|
|
232
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
233
|
|
234
|
private int checkAllColorsDifferent()
|
235
|
{
|
236
|
for(int i=0; i<8; i++)
|
237
|
{
|
238
|
boolean present = false;
|
239
|
|
240
|
for(int j=0; j<8; j++)
|
241
|
if( mFaceColors[j]==i )
|
242
|
{
|
243
|
present=true;
|
244
|
break;
|
245
|
}
|
246
|
|
247
|
if( !present ) return ERROR_CORNERS_CANNOT;
|
248
|
}
|
249
|
|
250
|
return 0;
|
251
|
}
|
252
|
|
253
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
254
|
|
255
|
private int checkAllCentersPresent(int[] centers)
|
256
|
{
|
257
|
for(int i=0; i<8; i++)
|
258
|
{
|
259
|
boolean present = false;
|
260
|
|
261
|
for(int j=0; j<8; j++)
|
262
|
if( centers[j]==i )
|
263
|
{
|
264
|
present=true;
|
265
|
break;
|
266
|
}
|
267
|
|
268
|
if( !present )
|
269
|
{
|
270
|
switch(i)
|
271
|
{
|
272
|
case 0: return ERROR_CENTER_0_MISSING;
|
273
|
case 1: return ERROR_CENTER_1_MISSING;
|
274
|
case 2: return ERROR_CENTER_2_MISSING;
|
275
|
case 3: return ERROR_CENTER_3_MISSING;
|
276
|
case 4: return ERROR_CENTER_4_MISSING;
|
277
|
case 5: return ERROR_CENTER_5_MISSING;
|
278
|
case 6: return ERROR_CENTER_6_MISSING;
|
279
|
case 7: return ERROR_CENTER_7_MISSING;
|
280
|
}
|
281
|
}
|
282
|
}
|
283
|
|
284
|
return 0;
|
285
|
}
|
286
|
|
287
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
288
|
|
289
|
private void getCorners(TwistyObject object, int[][] corners)
|
290
|
{
|
291
|
corners[0][0] = object.getCubitFaceStickerIndex( 0,5); // FR
|
292
|
corners[0][1] = object.getCubitFaceStickerIndex( 0,4);
|
293
|
corners[0][2] = object.getCubitFaceStickerIndex( 0,0);
|
294
|
corners[0][3] = object.getCubitFaceStickerIndex( 0,1);
|
295
|
|
296
|
corners[1][0] = object.getCubitFaceStickerIndex( 1,2); // BR
|
297
|
corners[1][1] = object.getCubitFaceStickerIndex( 1,6);
|
298
|
corners[1][2] = object.getCubitFaceStickerIndex( 1,5);
|
299
|
corners[1][3] = object.getCubitFaceStickerIndex( 1,1);
|
300
|
|
301
|
corners[2][0] = object.getCubitFaceStickerIndex( 2,7); // BL
|
302
|
corners[2][1] = object.getCubitFaceStickerIndex( 2,6);
|
303
|
corners[2][2] = object.getCubitFaceStickerIndex( 2,2);
|
304
|
corners[2][3] = object.getCubitFaceStickerIndex( 2,3);
|
305
|
|
306
|
corners[3][0] = object.getCubitFaceStickerIndex( 3,0); // FL
|
307
|
corners[3][1] = object.getCubitFaceStickerIndex( 3,4);
|
308
|
corners[3][2] = object.getCubitFaceStickerIndex( 3,7);
|
309
|
corners[3][3] = object.getCubitFaceStickerIndex( 3,3);
|
310
|
|
311
|
corners[4][0] = object.getCubitFaceStickerIndex( 4,0); // U
|
312
|
corners[4][1] = object.getCubitFaceStickerIndex( 4,3);
|
313
|
corners[4][2] = object.getCubitFaceStickerIndex( 4,2);
|
314
|
corners[4][3] = object.getCubitFaceStickerIndex( 4,1);
|
315
|
|
316
|
corners[5][0] = object.getCubitFaceStickerIndex( 5,5); // D
|
317
|
corners[5][1] = object.getCubitFaceStickerIndex( 5,6);
|
318
|
corners[5][2] = object.getCubitFaceStickerIndex( 5,7);
|
319
|
corners[5][3] = object.getCubitFaceStickerIndex( 5,4);
|
320
|
}
|
321
|
|
322
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
323
|
|
324
|
private void getCenters(TwistyObject object, int[] centers)
|
325
|
{
|
326
|
centers[0] = object.getCubitFaceStickerIndex( 9,0); // UF
|
327
|
centers[1] = object.getCubitFaceStickerIndex( 6,0); // UR
|
328
|
centers[2] = object.getCubitFaceStickerIndex( 7,0); // UB
|
329
|
centers[3] = object.getCubitFaceStickerIndex( 8,0); // UL
|
330
|
centers[4] = object.getCubitFaceStickerIndex(13,0); // DF
|
331
|
centers[5] = object.getCubitFaceStickerIndex(10,1); // DR
|
332
|
centers[6] = object.getCubitFaceStickerIndex(11,0); // DB
|
333
|
centers[7] = object.getCubitFaceStickerIndex(12,0); // DL
|
334
|
}
|
335
|
|
336
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
337
|
|
338
|
public int tablebaseIndex(TwistyObject object)
|
339
|
{
|
340
|
int[][] corners = new int[6][4];
|
341
|
int[] centers = new int[8];
|
342
|
|
343
|
getCorners(object,corners);
|
344
|
getCenters(object,centers);
|
345
|
|
346
|
int result1 = checkAllCentersPresent(centers);
|
347
|
if( result1<0 ) return result1;
|
348
|
|
349
|
int result2 = figureOutFaceColors(mFaceColors,centers,corners);
|
350
|
if( result2<0 ) return result2;
|
351
|
|
352
|
int result3 = checkAllColorsDifferent();
|
353
|
if( result3<0 ) return result3;
|
354
|
|
355
|
int[] corners_perm = getCornersPermutation(corners);
|
356
|
boolean even1 = TablebaseHelpers.permutationIsEven(corners_perm);
|
357
|
if( !even1 ) return ERROR_TWO_CORNERS;
|
358
|
|
359
|
int[] free_centers_perm = getFreeCentersPermutation(centers);
|
360
|
boolean even2 = TablebaseHelpers.permutationIsEven(free_centers_perm);
|
361
|
if( !even2 ) return ERROR_TWO_CENTERS;
|
362
|
|
363
|
int[] corners_twist = getCornersTwist(corners_perm, corners);
|
364
|
/*
|
365
|
android.util.Log.e("D", "faces: "+mFaceColors[0]+" "+mFaceColors[1]+" "+mFaceColors[2]+" "
|
366
|
+mFaceColors[3]+" "+mFaceColors[4]+" "+mFaceColors[5]+" "+mFaceColors[6]+" "+mFaceColors[7]);
|
367
|
|
368
|
android.util.Log.e("D", "corn perm: "+corners_perm[0]+" "+corners_perm[1]+" "+corners_perm[2]+" "
|
369
|
+corners_perm[3]+" "+corners_perm[4]+" "+corners_perm[5]);
|
370
|
|
371
|
android.util.Log.e("D", "corn twist: "+corners_twist[0]+" "+corners_twist[1]+" "+corners_twist[2]+" "
|
372
|
+corners_twist[3]+" "+corners_twist[4]+" "+corners_twist[5]);
|
373
|
*/
|
374
|
int totalTwist = getTotalTwist(corners_twist);
|
375
|
if( totalTwist<0 ) return ERROR_CORNER_TWIST;
|
376
|
|
377
|
int corners_perm_num = TablebaseHelpers.computeEvenPermutationNum(corners_perm);
|
378
|
int centers_perm_num = TablebaseHelpers.computeEvenPermutationNum(free_centers_perm);
|
379
|
|
380
|
return centers_perm_num + 12*(totalTwist + 32*corners_perm_num);
|
381
|
}
|
382
|
|
383
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
384
|
|
385
|
private int getColorIndex4(int face)
|
386
|
{
|
387
|
switch(mFaceColors[face])
|
388
|
{
|
389
|
case 0: return R.string.color_violet4;
|
390
|
case 1: return R.string.color_grey4;
|
391
|
case 2: return R.string.color_blue4;
|
392
|
case 3: return R.string.color_red4;
|
393
|
case 4: return R.string.color_orange4;
|
394
|
case 5: return R.string.color_green4;
|
395
|
case 6: return R.string.color_white4;
|
396
|
case 7: return R.string.color_yellow4;
|
397
|
}
|
398
|
|
399
|
return -1;
|
400
|
}
|
401
|
|
402
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
403
|
|
404
|
private int getColorIndex3(int face)
|
405
|
{
|
406
|
switch(mFaceColors[face])
|
407
|
{
|
408
|
case 0: return R.string.color_violet3;
|
409
|
case 1: return R.string.color_grey3;
|
410
|
case 2: return R.string.color_blue3;
|
411
|
case 3: return R.string.color_red3;
|
412
|
case 4: return R.string.color_orange3;
|
413
|
case 5: return R.string.color_green3;
|
414
|
case 6: return R.string.color_white3;
|
415
|
case 7: return R.string.color_yellow3;
|
416
|
}
|
417
|
|
418
|
return -1;
|
419
|
}
|
420
|
|
421
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
422
|
|
423
|
private int getColorIndex2(int face)
|
424
|
{
|
425
|
switch(face)
|
426
|
{
|
427
|
case 0: return R.string.color_violet2;
|
428
|
case 1: return R.string.color_grey2;
|
429
|
case 2: return R.string.color_blue2;
|
430
|
case 3: return R.string.color_red2;
|
431
|
case 4: return R.string.color_orange2;
|
432
|
case 5: return R.string.color_green2;
|
433
|
case 6: return R.string.color_white2;
|
434
|
case 7: return R.string.color_yellow2;
|
435
|
}
|
436
|
|
437
|
return -1;
|
438
|
}
|
439
|
|
440
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
441
|
|
442
|
private String centerError(Resources res, int face)
|
443
|
{
|
444
|
String color = res.getString(getColorIndex2(face));
|
445
|
return res.getString(R.string.solver_generic_missing_center,color);
|
446
|
}
|
447
|
|
448
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
449
|
|
450
|
private String cornerError(Resources res, int f1, int f2)
|
451
|
{
|
452
|
String c1 = res.getString(getColorIndex3(f1));
|
453
|
String c2 = res.getString(getColorIndex4(f2));
|
454
|
return res.getString(R.string.solver_generic_missing_corner2,c1,c2);
|
455
|
}
|
456
|
|
457
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
458
|
|
459
|
public String error(int index, Resources res)
|
460
|
{
|
461
|
switch(index)
|
462
|
{
|
463
|
case ERROR_CORNER_FR_MISSING: return cornerError(res,1,4);
|
464
|
case ERROR_CORNER_BR_MISSING: return cornerError(res,1,6);
|
465
|
case ERROR_CORNER_BL_MISSING: return cornerError(res,3,6);
|
466
|
case ERROR_CORNER_FL_MISSING: return cornerError(res,3,4);
|
467
|
case ERROR_CORNER_TO_MISSING: return cornerError(res,1,3);
|
468
|
case ERROR_CORNER_BO_MISSING: return cornerError(res,4,6);
|
469
|
|
470
|
case ERROR_CENTER_0_MISSING : return centerError(res,0);
|
471
|
case ERROR_CENTER_1_MISSING : return centerError(res,1);
|
472
|
case ERROR_CENTER_2_MISSING : return centerError(res,2);
|
473
|
case ERROR_CENTER_3_MISSING : return centerError(res,3);
|
474
|
case ERROR_CENTER_4_MISSING : return centerError(res,4);
|
475
|
case ERROR_CENTER_5_MISSING : return centerError(res,5);
|
476
|
case ERROR_CENTER_6_MISSING : return centerError(res,6);
|
477
|
case ERROR_CENTER_7_MISSING : return centerError(res,7);
|
478
|
|
479
|
case ERROR_TWO_CORNERS : return res.getString(R.string.solver_generic_two_corners);
|
480
|
case ERROR_TWO_CENTERS : return res.getString(R.string.solver_generic_two_centers);
|
481
|
case ERROR_CORNER_TWIST : return res.getString(R.string.solver_generic_corner_twist);
|
482
|
case ERROR_CORNERS_CANNOT : return res.getString(R.string.solver_generic_corners_cannot);
|
483
|
}
|
484
|
|
485
|
return null;
|
486
|
}
|
487
|
|
488
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
489
|
|
490
|
public int[][] solution(int index, OperatingSystemInterface os)
|
491
|
{
|
492
|
if( mSolver==null )
|
493
|
{
|
494
|
mSolver = ImplementedTablebasesList.createPacked(os, ObjectSignatures.DIAM_2);
|
495
|
}
|
496
|
|
497
|
return mSolver!=null ? mSolver.solution(index,null,os) : null;
|
498
|
}
|
499
|
}
|
500
|
|