commit 03389bee3ca6716cead9183c993864b759778a3b
Author: leszek <leszek@koltunski.pl>
Date:   Thu Jan 30 13:12:34 2025 +0100

    compiles now

diff --git a/src/main/java/org/distorted/phasedsolver/SolverActivity.java b/src/main/java/org/distorted/phasedsolver/SolverActivity.java
index 28a382b..673cae7 100644
--- a/src/main/java/org/distorted/phasedsolver/SolverActivity.java
+++ b/src/main/java/org/distorted/phasedsolver/SolverActivity.java
@@ -24,6 +24,7 @@ import android.widget.Toast;
 import androidx.preference.PreferenceManager;
 
 import org.distorted.library.main.DistortedLibrary;
+import org.distorted.objectlib.helpers.ObjectMove;
 import org.distorted.objectlib.solvers.implemented.PhasedSolverList;
 import org.distorted.objectlib.solvers.implemented.PhasedSolverAbstract;
 import org.distorted.objectlib.main.InitAssets;
@@ -235,7 +236,7 @@ public class SolverActivity extends Activity implements SolutionListener, Adapte
     else
       {
       int numMoves = solution[0];
-      int[][] moves = new int[numMoves][];
+      ObjectMove[] moves = new ObjectMove[numMoves];
       int index = 0;
 
       for(int m=1; m<=numMoves; m++)
diff --git a/src/main/java/org/distorted/phasedsolver/SolverLowerPane.java b/src/main/java/org/distorted/phasedsolver/SolverLowerPane.java
index ac32380..209af31 100644
--- a/src/main/java/org/distorted/phasedsolver/SolverLowerPane.java
+++ b/src/main/java/org/distorted/phasedsolver/SolverLowerPane.java
@@ -20,6 +20,7 @@ import org.distorted.library.type.Dynamic4D;
 import org.distorted.library.type.Static2D;
 import org.distorted.library.type.Static4D;
 import org.distorted.objectlib.helpers.MovesFinished;
+import org.distorted.objectlib.helpers.ObjectMove;
 import org.distorted.objectlib.main.ObjectControl;
 import org.distorted.objectlib.main.TwistyObject;
 
@@ -37,7 +38,7 @@ public class SolverLowerPane implements MovesFinished, EffectListener
   private final TextView mText, mPhase;
   private String[] mPhaseNames;
   private int mNumPhases;
-  private int[][][] mMoves;
+  private ObjectMove[][] mMoves;
   private int[][] mCubitsNotInvolved;
   private int mNumMoves,mCurrMove,mCurrPhase;
   private boolean mCanMove;
@@ -74,7 +75,7 @@ public class SolverLowerPane implements MovesFinished, EffectListener
 
     mPhaseNames = names;
     mNumPhases = names.length;
-    mMoves = new int[mNumPhases][][];
+    mMoves = new ObjectMove[mNumPhases][];
     mCubitsNotInvolved = new int[mNumPhases][];
     mCanMove = true;
     setSolution(null,0,null);
@@ -86,7 +87,7 @@ public class SolverLowerPane implements MovesFinished, EffectListener
     {
     mPhaseNames = names;
     mNumPhases = names.length;
-    mMoves = new int[mNumPhases][][];
+    mMoves = new ObjectMove[mNumPhases][];
     mCubitsNotInvolved = new int[mNumPhases][];
     mCanMove = true;
     setSolution(null,0,null);
@@ -101,7 +102,7 @@ public class SolverLowerPane implements MovesFinished, EffectListener
 
     if( mCurrMove>0 )
       {
-      int[][] moves = transformMoves(mMoves[mCurrPhase],0,mCurrMove, false);
+      ObjectMove[] moves = transformMoves(mMoves[mCurrPhase],0,mCurrMove, false);
       control.applyScrambles(moves);
       mCurrMove = 0;
       }
@@ -110,7 +111,7 @@ public class SolverLowerPane implements MovesFinished, EffectListener
       mCurrPhase--;
       mNumMoves = mMoves[mCurrPhase]==null ? 0 : mMoves[mCurrPhase].length;
       mCurrMove = 0;
-      int[][] moves = transformMoves(mMoves[mCurrPhase],0,mNumMoves, false);
+      ObjectMove[] moves = transformMoves(mMoves[mCurrPhase],0,mNumMoves, false);
       control.applyScrambles(moves);
       }
     else
@@ -118,7 +119,7 @@ public class SolverLowerPane implements MovesFinished, EffectListener
       mCurrPhase = mNumPhases-1;
       mNumMoves = mMoves[mCurrPhase]==null ? 0 : mMoves[mCurrPhase].length;
       mCurrMove = mNumMoves;
-      int[][] moves = transformMoves(mMoves, true);
+      ObjectMove[] moves = transformMoves(mMoves, true);
       control.applyScrambles(moves);
       }
 
@@ -135,7 +136,7 @@ public class SolverLowerPane implements MovesFinished, EffectListener
     if( mCurrPhase<mNumPhases-1 )
       {
       glowCubits(mCubitsNotInvolved[mCurrPhase]);
-      int[][] moves = transformMoves(mMoves[mCurrPhase],mCurrMove,mNumMoves, true);
+      ObjectMove[] moves = transformMoves(mMoves[mCurrPhase],mCurrMove,mNumMoves, true);
       control.applyScrambles(moves);
       mCurrPhase++;
       mNumMoves = mMoves[mCurrPhase]==null ? 0 : mMoves[mCurrPhase].length;
@@ -144,7 +145,7 @@ public class SolverLowerPane implements MovesFinished, EffectListener
     else if( mCurrMove<mNumMoves )
       {
       glowCubits(mCubitsNotInvolved[mCurrPhase]);
-      int[][] moves = transformMoves(mMoves[mCurrPhase],mCurrMove,mNumMoves, true);
+      ObjectMove[] moves = transformMoves(mMoves[mCurrPhase],mCurrMove,mNumMoves, true);
       control.applyScrambles(moves);
       mCurrMove = mNumMoves;
       }
@@ -153,7 +154,7 @@ public class SolverLowerPane implements MovesFinished, EffectListener
       mCurrPhase = 0;
       mNumMoves = mMoves[mCurrPhase]==null ? 0 : mMoves[mCurrPhase].length;
       mCurrMove = 0;
-      int[][] moves = transformMoves(mMoves, false);
+      ObjectMove[] moves = transformMoves(mMoves, false);
       control.applyScrambles(moves);
       }
 
@@ -190,20 +191,15 @@ public class SolverLowerPane implements MovesFinished, EffectListener
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private int[][] transformMoves(int[][] moves, int start, int end, boolean front)
+  private ObjectMove[] transformMoves(ObjectMove[] moves, int start, int end, boolean front)
     {
-    int mult = front ? 1:-1;
     int len = end-start;
-    int[][] ret = new int[len][];
+    ObjectMove[] ret = new ObjectMove[len];
 
     for(int m=0; m<len; m++)
       {
-      int[] mv = moves[front ? start+m : end-1-m];
-      int[] rt = new int[3];
-      rt[0] = mv[0];
-      rt[1] = (1<<mv[1]);
-      rt[2] = mult*mv[2];
-      ret[m] = rt;
+      ObjectMove mv = moves[front ? start+m : end-1-m];
+      ret[m] = new ObjectMove( mv.getAxis(), mv.getRowBitmap(), front ? mv.getAngle() : -mv.getAngle());
       }
 
     return ret;
@@ -211,29 +207,24 @@ public class SolverLowerPane implements MovesFinished, EffectListener
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private int[][] transformMoves(int[][][] moves, boolean front)
+  private ObjectMove[] transformMoves(ObjectMove[][] moves, boolean front)
     {
     int len = moves.length;
     int totalLen = 0;
-    for (int[][] move : moves) totalLen += (move==null ? 0 : move.length);
+    for (ObjectMove[] move : moves) totalLen += (move==null ? 0 : move.length);
 
-    int[][] ret = new int[totalLen][];
-    int mult = front ? 1:-1;
+    ObjectMove[] ret = new ObjectMove[totalLen];
     int index = 0;
 
     for(int m=0; m<len; m++)
       {
-      int[][] mv = moves[front ? m : len-1-m];
+      ObjectMove[] mv = moves[front ? m : len-1-m];
       int l = (mv==null ? 0 : mv.length);
 
       for(int p=0; p<l; p++)
         {
-        int[] mve = mv[front ? p : l-1-p];
-        int[] rt = new int[3];
-        rt[0] = mve[0];
-        rt[1] = (1<<mve[1]);
-        rt[2] = mult*mve[2];
-        ret[index++] = rt;
+        ObjectMove mve = mv[front ? p : l-1-p];
+        ret[index++] = new ObjectMove( mve.getAxis(), mve.getRowBitmap(), front ? mve.getAngle() : -mve.getAngle());
         }
       }
 
@@ -301,7 +292,7 @@ public class SolverLowerPane implements MovesFinished, EffectListener
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  void setSolution(int[][] moves, int phase, int[][] subphases)
+  void setSolution(ObjectMove[] moves, int phase, int[][] subphases)
     {
     SolverActivity act=mAct.get();
 
@@ -344,10 +335,10 @@ public class SolverLowerPane implements MovesFinished, EffectListener
       if( mCurrMove>0 )
         {
         mCanMove = false;
-        int[] move = mMoves[mCurrPhase][--mCurrMove];
+        ObjectMove move = mMoves[mCurrPhase][--mCurrMove];
         ObjectControl control = act.getControl();
         control.blockTouch(MOVES_PLACE_0);
-        control.addRotation(this, move[0], (1<<move[1]), -move[2], MILLIS_PER_DEGREE);
+        control.addRotation(this, move.getAxis(), move.getRowBitmap(), -move.getAngle(), MILLIS_PER_DEGREE);
         }
       else if( mCurrPhase>0 )
         {
@@ -361,7 +352,7 @@ public class SolverLowerPane implements MovesFinished, EffectListener
         mCurrPhase = mNumPhases-1;
         mNumMoves = mMoves[mCurrPhase]==null ? 0 : mMoves[mCurrPhase].length;
         mCurrMove = mNumMoves;
-        int[][] moves = transformMoves(mMoves, true);
+        ObjectMove[] moves = transformMoves(mMoves, true);
         ObjectControl control = act.getControl();
         control.applyScrambles(moves);
         glowCubits(mCubitsNotInvolved[mCurrPhase]);
@@ -382,10 +373,10 @@ public class SolverLowerPane implements MovesFinished, EffectListener
       if( mCurrMove<mNumMoves )
         {
         mCanMove = false;
-        int[] move = mMoves[mCurrPhase][mCurrMove++];
+        ObjectMove move = mMoves[mCurrPhase][mCurrMove++];
         ObjectControl control = act.getControl();
         control.blockTouch(MOVES_PLACE_1);
-        control.addRotation(this, move[0], (1<<move[1]), move[2], MILLIS_PER_DEGREE);
+        control.addRotation(this, move.getAxis(), move.getRowBitmap(), move.getAngle(), MILLIS_PER_DEGREE);
         if( mCurrMove==mNumMoves && mCurrPhase==mNumPhases-1 ) glowCubits(mCubitsNotInvolved[mCurrPhase]);
         }
       else if( mCurrPhase<mNumPhases-1 )
@@ -400,7 +391,7 @@ public class SolverLowerPane implements MovesFinished, EffectListener
         mCurrPhase = 0;
         mNumMoves = mMoves[mCurrPhase]==null ? 0 : mMoves[mCurrPhase].length;
         mCurrMove = 0;
-        int[][] moves = transformMoves(mMoves, false);
+        ObjectMove[] moves = transformMoves(mMoves, false);
         ObjectControl control = act.getControl();
         control.applyScrambles(moves);
         }
