Project

General

Profile

« Previous | Next » 

Revision 20d6e688

Added by Leszek Koltunski about 11 hours ago

  • ID 20d6e6885f51bb020f29406cf852afe1fa21174c
  • Parent c65092dd

minor

View differences:

src/main/java/org/distorted/solvers/SolverTablebasePDUO2.java
241 241
    return green_face + 4*(corner_twist[3] + 3*(corner_twist[2] + 3*(corner_twist[1] + 3*corner_twist[0])));
242 242
    }
243 243

  
244
///////////////////////////////////////////////////////////////////////////////////////////////////
245

  
246
  private String cornerError(Resources res, int color0, int color1, int color2)
247
    {
248
    int j0 = getTetColor(color0,3);
249
    int j1 = getTetColor(color1,3);
250
    int j2 = getTetColor(color2,4);
251

  
252
    String c0 = res.getString(j0);
253
    String c1 = res.getString(j1);
254
    String c2 = res.getString(j2);
255

  
256
    return res.getString(R.string.solver_generic_missing_corner,c0,c1,c2);
257
    }
258

  
259
///////////////////////////////////////////////////////////////////////////////////////////////////
260

  
261
  private String centerError(Resources res, int face)
262
    {
263
    int color = getTetColor(face,2);
264
    String clr= res.getString(color);
265
    return res.getString(R.string.solver_generic_missing_center,clr);
266
    }
267

  
244 268
///////////////////////////////////////////////////////////////////////////////////////////////////
245 269

  
246 270
  public String error(int index, Resources res)
247 271
    {
248 272
    switch(index)
249 273
      {
250
      case ERROR_CORNER_YBR_MISSING: String c01 = res.getString(R.string.color_yellow3);
251
                                     String c02 = res.getString(R.string.color_blue3);
252
                                     String c03 = res.getString(R.string.color_red4);
253
                                     return res.getString(R.string.solver_generic_missing_corner,c01,c02,c03);
254
      case ERROR_CORNER_GBR_MISSING: String c11 = res.getString(R.string.color_green3);
255
                                     String c12 = res.getString(R.string.color_blue3);
256
                                     String c13 = res.getString(R.string.color_red4);
257
                                     return res.getString(R.string.solver_generic_missing_corner,c11,c12,c13);
258
      case ERROR_CORNER_GYR_MISSING: String c21 = res.getString(R.string.color_green3);
259
                                     String c22 = res.getString(R.string.color_yellow3);
260
                                     String c23 = res.getString(R.string.color_red4);
261
                                     return res.getString(R.string.solver_generic_missing_corner,c21,c22,c23);
262
      case ERROR_CORNER_GYB_MISSING: String c31 = res.getString(R.string.color_green3);
263
                                     String c32 = res.getString(R.string.color_yellow3);
264
                                     String c33 = res.getString(R.string.color_blue4);
265
                                     return res.getString(R.string.solver_generic_missing_corner,c31,c32,c33);
266
      case ERROR_CENTER_G_MISSING  : String colorG = res.getString(R.string.color_green2);
267
                                     return res.getString(R.string.solver_generic_missing_center,colorG);
268
      case ERROR_CENTER_Y_MISSING  : String colorY = res.getString(R.string.color_yellow2);
269
                                     return res.getString(R.string.solver_generic_missing_center,colorY);
270
      case ERROR_CENTER_B_MISSING  : String colorB = res.getString(R.string.color_blue2);
271
                                     return res.getString(R.string.solver_generic_missing_center,colorB);
272
      case ERROR_CENTER_R_MISSING  : String colorR = res.getString(R.string.color_red2);
273
                                     return res.getString(R.string.solver_generic_missing_center,colorR);
274
      case ERROR_CORNER_YBR_MISSING: return cornerError(res,3,2,1);
275
      case ERROR_CORNER_GBR_MISSING: return cornerError(res,3,2,0);
276
      case ERROR_CORNER_GYR_MISSING: return cornerError(res,3,1,0);
277
      case ERROR_CORNER_GYB_MISSING: return cornerError(res,2,1,0);
278
      case ERROR_CENTER_G_MISSING  : return centerError(res,0);
279
      case ERROR_CENTER_Y_MISSING  : return centerError(res,1);
280
      case ERROR_CENTER_B_MISSING  : return centerError(res,2);
281
      case ERROR_CENTER_R_MISSING  : return centerError(res,3);
274 282
      case ERROR_TWO_CENTERS       : return res.getString(R.string.solver_generic_two_centers);
275 283
      case ERROR_CORNER_TWISTED    : return res.getString(R.string.solver_generic_corner_twist);
276 284
      case ERROR_CORNERS_CANNOT    : return res.getString(R.string.solver_generic_corners_cannot);
src/main/java/org/distorted/solvers/SolverTablebaseSKEW2.java
361 361
      case ERROR_CORNER_034_MISSING   : return cornerError(res,0,3,4);
362 362
      case ERROR_CORNER_025_MISSING   : return cornerError(res,0,2,5);
363 363
      case ERROR_CORNER_024_MISSING   : return cornerError(res,0,2,4);
364

  
365 364
      case ERROR_CENTER_0_MISSING     : return centerError(res,0);
366 365
      case ERROR_CENTER_1_MISSING     : return centerError(res,1);
367 366
      case ERROR_CENTER_2_MISSING     : return centerError(res,2);
368 367
      case ERROR_CENTER_3_MISSING     : return centerError(res,3);
369 368
      case ERROR_CENTER_4_MISSING     : return centerError(res,4);
370 369
      case ERROR_CENTER_5_MISSING     : return centerError(res,5);
371

  
372 370
      case ERROR_CORNERS_CANNOT       : return res.getString(R.string.solver_generic_corners_cannot);
373 371
      case ERROR_CORNER_TWISTED       : return res.getString(R.string.solver_generic_corner_twist);
374 372
      case ERROR_TWO_CENTERS          : return res.getString(R.string.solver_generic_two_centers);
375 373
      case ERROR_TWO_CORNERS          : return res.getString(R.string.solver_generic_two_corners);
376

  
377 374
      case ERROR_FREE_CORNERS_NOT_EVEN: return res.getString(R.string.solver_generic_free_corners_odd);
378 375
      case ERROR_FREE_CORNERS_ROTATED : return res.getString(R.string.solver_generic_free_corners_rotated);
379 376
      }

Also available in: Unified diff