commit 9a39aabfdf268dedf2d9f7f62006f6034c3b7f4d
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Tue Feb 28 17:30:36 2023 +0100

    Beginnings of Skewb Diamond solver.

diff --git a/src/main/java/org/distorted/solvers/SolverMain.java b/src/main/java/org/distorted/solvers/SolverMain.java
index e91fc2e2..a09b0fbc 100644
--- a/src/main/java/org/distorted/solvers/SolverMain.java
+++ b/src/main/java/org/distorted/solvers/SolverMain.java
@@ -96,6 +96,11 @@ public class SolverMain implements Runnable
       SolverTablebase solver = new SolverPyraminx(mRes,mObject);
       solver.solve(screen);
       }
+    else if( mSignature==ObjectSignatures.DIAM_2 )
+      {
+      SolverTablebase solver = new SolverSkewbDiamond(mRes,mObject);
+      solver.solve(screen);
+      }
     else
       {
       screen.displayErrorDialog(mRes.getString(R.string.solver_generic_not_implemented));
diff --git a/src/main/java/org/distorted/solvers/SolverSkewbDiamond.java b/src/main/java/org/distorted/solvers/SolverSkewbDiamond.java
new file mode 100644
index 00000000..33d4a8d8
--- /dev/null
+++ b/src/main/java/org/distorted/solvers/SolverSkewbDiamond.java
@@ -0,0 +1,105 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2023 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Magic Cube.                                                              //
+//                                                                                               //
+// Magic Cube is proprietary software licensed under an EULA which you should have received      //
+// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html        //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+package org.distorted.solvers;
+
+import android.content.res.Resources;
+
+import org.distorted.objectlib.main.ObjectType;
+import org.distorted.objectlib.main.TwistyObject;
+import org.distorted.objectlib.tablebases.ImplementedTablebasesList;
+import org.distorted.objectlib.tablebases.TablebasesAbstract;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+public class SolverSkewbDiamond extends SolverTablebase
+{
+  private static final int ERROR_CORNER_FR_MISSING = -1;
+  private static final int ERROR_CORNER_BR_MISSING = -2;
+  private static final int ERROR_CORNER_BL_MISSING = -3;
+  private static final int ERROR_CORNER_FL_MISSING = -4;
+  private static final int ERROR_CORNER_TO_MISSING = -5;
+  private static final int ERROR_CORNER_BO_MISSING = -6;
+
+  private static final int ERROR_CENTER_0_MISSING = -7;
+  private static final int ERROR_CENTER_1_MISSING = -8;
+  private static final int ERROR_CENTER_2_MISSING = -9;
+  private static final int ERROR_CENTER_3_MISSING = -10;
+  private static final int ERROR_CENTER_4_MISSING = -11;
+  private static final int ERROR_CENTER_5_MISSING = -12;
+  private static final int ERROR_CENTER_6_MISSING = -13;
+  private static final int ERROR_CENTER_7_MISSING = -14;
+
+  private static final int ERROR_TWO_CORNERS      = -15;
+  private static final int ERROR_TWO_CENTERS      = -16;
+  private static final int ERROR_CORNER_TWIST     = -17;
+
+  private TablebasesAbstract mSolver;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public SolverSkewbDiamond(Resources res, TwistyObject object)
+    {
+    super(res,object);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public int tablebaseIndex(TwistyObject object)
+    {
+    return 0;
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public String error(int index, Resources res)
+    {
+    switch(index)
+      {
+  /*
+ private static final int ERROR_CORNER_FR_MISSING = -1;
+  private static final int ERROR_CORNER_BR_MISSING = -2;
+  private static final int ERROR_CORNER_BL_MISSING = -3;
+  private static final int ERROR_CORNER_FL_MISSING = -4;
+  private static final int ERROR_CORNER_TO_MISSING = -5;
+  private static final int ERROR_CORNER_BO_MISSING = -6;
+
+  private static final int ERROR_CENTER_0_MISSING = -7;
+  private static final int ERROR_CENTER_1_MISSING = -8;
+  private static final int ERROR_CENTER_2_MISSING = -9;
+  private static final int ERROR_CENTER_3_MISSING = -10;
+  private static final int ERROR_CENTER_4_MISSING = -11;
+  private static final int ERROR_CENTER_5_MISSING = -12;
+  private static final int ERROR_CENTER_6_MISSING = -13;
+  private static final int ERROR_CENTER_7_MISSING = -14;
+
+  private static final int ERROR_TWO_CORNERS      = -15;
+  private static final int ERROR_TWO_CENTERS      = -16;
+  private static final int ERROR_CORNER_TWIST     = -17;
+
+   */
+      }
+
+    return null;
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public int[][] solution(int index, Resources res)
+    {
+    if( mSolver==null )
+      {
+      mSolver = ImplementedTablebasesList.createUnpacked(ObjectType.DIAM_2);
+      if( mSolver!=null ) mSolver.createTablebase();
+      }
+
+    return mSolver!=null ? mSolver.solution(index) : null;
+    }
+}  
+
