commit 63ebcf3a2d745fb8d26d02b6aa6605ddb6d5ba57
Author: leszek <leszek@koltunski.pl>
Date:   Thu Jan 30 22:20:49 2025 +0100

    progress

diff --git a/src/main/java/org/distorted/helpers/MovesController.java b/src/main/java/org/distorted/helpers/MovesController.java
index bf217076..250a01aa 100644
--- a/src/main/java/org/distorted/helpers/MovesController.java
+++ b/src/main/java/org/distorted/helpers/MovesController.java
@@ -17,6 +17,7 @@ import android.view.View;
 import android.widget.LinearLayout;
 
 import org.distorted.objectlib.helpers.MovesFinished;
+import org.distorted.objectlib.helpers.ObjectMove;
 import org.distorted.objectlib.main.ObjectControl;
 
 import org.distorted.main.R;
@@ -28,19 +29,7 @@ public class MovesController implements MovesFinished
   private static final int MOVES_PLACE_0 = 100;
   private static final int MILLIS_PER_DEGREE = 6;
 
-  private static class Move
-    {
-    private final int mAxis, mRow, mAngle;
-
-    Move(int axis, int row, int angle)
-      {
-      mAxis = axis;
-      mRow  = row;
-      mAngle= angle;
-      }
-    }
-
-  private final ArrayList<Move> mMoves;
+  private final ArrayList<ObjectMove> mMoves;
   private boolean mCanPrevMove;
   private ObjectControl mControl;
   private TransparentImageButton mPrevButton;
@@ -71,16 +60,15 @@ public class MovesController implements MovesFinished
 
       if( numMoves>0 )
         {
-        Move move = mMoves.remove(numMoves-1);
-        int axis  = move.mAxis;
-        int angle = move.mAngle;
+        ObjectMove move = mMoves.remove(numMoves-1);
+        int angle = move.getAngle();
 
         if( angle!=0 )
           {
           mCanPrevMove = false;
           mControl = control;
           mControl.blockTouch(MOVES_PLACE_0);
-          mControl.addRotation(this, axis, (1<<move.mRow), -angle, MILLIS_PER_DEGREE);
+          mControl.addBackwardRotation(this, move, MILLIS_PER_DEGREE);
           }
         else
           {
@@ -112,7 +100,7 @@ public class MovesController implements MovesFinished
   public void addMove(Activity act, int axis, int row, int angle)
     {
     if( mMoves.isEmpty() ) changeBackMove(act,true);
-    mMoves.add(new Move(axis,row,angle));
+    mMoves.add(new ObjectMove(axis,1<<row,angle));
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -165,14 +153,14 @@ public class MovesController implements MovesFinished
 
       for(int m=0; m<numMoves; m++)
         {
-        Move move = mMoves.get(m);
+        ObjectMove move = mMoves.get(m);
 
         if( m>0 ) moves.append(' ');
-        moves.append(move.mAxis);
+        moves.append(move.getAxis());
         moves.append(' ');
-        moves.append(move.mRow);
+        moves.append(move.getRow());
         moves.append(' ');
-        moves.append(move.mAngle);
+        moves.append(move.getAngle());
         }
 
       editor.putString( key, moves.toString() );
diff --git a/src/main/java/org/distorted/solvers/ScreenSolutionMultiphased.java b/src/main/java/org/distorted/solvers/ScreenSolutionMultiphased.java
index 28527b1d..968d1645 100644
--- a/src/main/java/org/distorted/solvers/ScreenSolutionMultiphased.java
+++ b/src/main/java/org/distorted/solvers/ScreenSolutionMultiphased.java
@@ -445,7 +445,7 @@ public class ScreenSolutionMultiphased extends ScreenAbstract implements MovesFi
         ObjectMove move = mMoves[mCurrPhase][--mCurrMove];
         ObjectControl control = act.getControl();
         control.blockTouch(MOVES_PLACE_0);
-        control.addRotation(this, move.getAxis(), move.getRowBitmap(), -move.getAngle(), MILLIS_PER_DEGREE);
+        control.addBackwardRotation(this, move, MILLIS_PER_DEGREE);
         }
       else if( mCurrPhase>0 )
         {
@@ -483,7 +483,7 @@ public class ScreenSolutionMultiphased extends ScreenAbstract implements MovesFi
         ObjectMove move = mMoves[mCurrPhase][mCurrMove++];
         ObjectControl control = act.getControl();
         control.blockTouch(MOVES_PLACE_1);
-        control.addRotation(this, move.getAxis(), move.getRowBitmap(), move.getAngle(), MILLIS_PER_DEGREE);
+        control.addForwardRotation(this, move, MILLIS_PER_DEGREE);
         if( mCurrMove==mNumMoves && mCurrPhase==mNumPhases-1 ) glowCubits(mCubitsNotInvolved[mCurrPhase]);
         }
       else if( mCurrPhase<mNumPhases-1 )
diff --git a/src/main/java/org/distorted/solvers/ScreenSolutionSinglephased.java b/src/main/java/org/distorted/solvers/ScreenSolutionSinglephased.java
index b8465c48..c242069b 100644
--- a/src/main/java/org/distorted/solvers/ScreenSolutionSinglephased.java
+++ b/src/main/java/org/distorted/solvers/ScreenSolutionSinglephased.java
@@ -191,14 +191,12 @@ public class ScreenSolutionSinglephased extends ScreenAbstract implements MovesF
         }
       else
         {
-        int axis      = mMoves[mCurrMove-1].getAxis();
-		int rowBitmap = mMoves[mCurrMove-1].getRowBitmap();
-		int bareAngle = mMoves[mCurrMove-1].getAngle();
+        int bareAngle = mMoves[mCurrMove-1].getAngle();
 
         if( bareAngle!=0 )
           {
           mCanRotate = false;
-          control.addRotation(this, axis, rowBitmap, bareAngle, MILLIS_PER_DEGREE);
+          control.addForwardRotation(this, mMoves[mCurrMove-1], MILLIS_PER_DEGREE);
           }
         else
           {
@@ -227,14 +225,12 @@ public class ScreenSolutionSinglephased extends ScreenAbstract implements MovesF
         }
       else
         {
-        int axis      = mMoves[mCurrMove].getAxis();
-	    int rowBitmap = mMoves[mCurrMove].getRowBitmap();
-	    int bareAngle = mMoves[mCurrMove].getAngle();
+        int bareAngle = mMoves[mCurrMove].getAngle();
 
         if( bareAngle!=0 )
           {
           mCanRotate = false;
-          control.addRotation(this, axis, rowBitmap, -bareAngle, MILLIS_PER_DEGREE);
+          control.addBackwardRotation(this, mMoves[mCurrMove], MILLIS_PER_DEGREE);
           }
         else
           {
