commit 032657c351cd87dceed0b402c823567d61f3b6ad
Author: leszek <leszek@koltunski.pl>
Date:   Fri Jan 31 01:50:49 2025 +0100

    improvements to the API

diff --git a/src/main/java/org/distorted/config/ConfigObjectLibInterface.java b/src/main/java/org/distorted/config/ConfigObjectLibInterface.java
index 847ba129..4caf4256 100644
--- a/src/main/java/org/distorted/config/ConfigObjectLibInterface.java
+++ b/src/main/java/org/distorted/config/ConfigObjectLibInterface.java
@@ -33,7 +33,7 @@ public class ConfigObjectLibInterface implements ObjectLibInterface
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  public void onWinEffectFinished(long startTime, long endTime, String debug, int scrambleNum) { }
+  public void onWinEffectFinished(long startTime, long endTime, int scrambleNum) { }
   public void onScrambleEffectFinished() { }
   public void onBeginRotation() { }
   public void onSolved() { }
diff --git a/src/main/java/org/distorted/helpers/MovesController.java b/src/main/java/org/distorted/helpers/MovesController.java
index 250a01aa..bcc58a43 100644
--- a/src/main/java/org/distorted/helpers/MovesController.java
+++ b/src/main/java/org/distorted/helpers/MovesController.java
@@ -61,9 +61,8 @@ public class MovesController implements MovesFinished
       if( numMoves>0 )
         {
         ObjectMove move = mMoves.remove(numMoves-1);
-        int angle = move.getAngle();
 
-        if( angle!=0 )
+        if( move.isNonempty() )
           {
           mCanPrevMove = false;
           mControl = control;
diff --git a/src/main/java/org/distorted/info/InfoObjectLibInterface.java b/src/main/java/org/distorted/info/InfoObjectLibInterface.java
index 0f1aa715..4c53733c 100644
--- a/src/main/java/org/distorted/info/InfoObjectLibInterface.java
+++ b/src/main/java/org/distorted/info/InfoObjectLibInterface.java
@@ -20,7 +20,7 @@ import org.distorted.objectlib.helpers.ObjectLibInterface;
 
 public class InfoObjectLibInterface implements ObjectLibInterface
 {
-  public void onWinEffectFinished(long startTime, long endTime, String debug, int scrambleNum) { }
+  public void onWinEffectFinished(long startTime, long endTime, int scrambleNum) { }
   public void onScrambleEffectFinished() { }
   public void onBeginRotation() { }
   public void onSolved() { }
diff --git a/src/main/java/org/distorted/patterns/PatternObjectLibInterface.java b/src/main/java/org/distorted/patterns/PatternObjectLibInterface.java
index f19b6ea2..ef349fd7 100644
--- a/src/main/java/org/distorted/patterns/PatternObjectLibInterface.java
+++ b/src/main/java/org/distorted/patterns/PatternObjectLibInterface.java
@@ -29,7 +29,7 @@ public class PatternObjectLibInterface implements ObjectLibInterface
   public void failedToDrag() { }
   public void onSolved() { }
   public void onObjectCreated(long time) { }
-  public void onWinEffectFinished(long startTime, long endTime, String debug, int scrambleNum) { }
+  public void onWinEffectFinished(long startTime, long endTime, int scrambleNum) { }
   public void onStickerTouched(int cubit, int face) { }
   public void onStickerUntouched() { }
 
diff --git a/src/main/java/org/distorted/play/PlayLibInterface.java b/src/main/java/org/distorted/play/PlayLibInterface.java
index 1c2f5142..5a34bc00 100644
--- a/src/main/java/org/distorted/play/PlayLibInterface.java
+++ b/src/main/java/org/distorted/play/PlayLibInterface.java
@@ -94,7 +94,7 @@ public class PlayLibInterface implements ObjectLibInterface
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private void reportRecord(PlayActivity act, long startTime, long endTime, String debug, int scrambleNum)
+  private void reportRecord(PlayActivity act, long startTime, long endTime, int scrambleNum)
     {
     RubikScores scores  = RubikScores.getInstance();
     int objectOrdinal = act.getObjectOrdinal();
@@ -106,7 +106,6 @@ public class PlayLibInterface implements ObjectLibInterface
 
     if( BuildConfig.DEBUG )
       {
-      android.util.Log.e("libInterface", debug);
       android.util.Log.e("libInterface", name);
       android.util.Log.e("libInterface", record);
       }
@@ -116,7 +115,7 @@ public class PlayLibInterface implements ObjectLibInterface
         {
         long timeNow = System.currentTimeMillis();
         long elapsed = timeNow - startTime;
-        String suspicious ="start"+startTime+"end"+endTime+"elapsed"+elapsed+"obj"+objName+"record"+mNewRecord+"scrambles"+scrambleNum+debug;
+        String suspicious ="start"+startTime+"end"+endTime+"elapsed"+elapsed+"obj"+objName+"record"+mNewRecord+"scrambles"+scrambleNum;
         RubikNetwork network = RubikNetwork.getInstance();
         network.suspicious(suspicious,act);
         }
@@ -126,7 +125,6 @@ public class PlayLibInterface implements ObjectLibInterface
       if( analytics!=null )
         {
         Bundle bundle = new Bundle();
-        bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, debug);
         bundle.putString(FirebaseAnalytics.Param.CHARACTER, name);
         bundle.putString(FirebaseAnalytics.Param.LEVEL, record);
         analytics.logEvent(FirebaseAnalytics.Event.LEVEL_UP, bundle);
@@ -288,7 +286,7 @@ public class PlayLibInterface implements ObjectLibInterface
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  public void onWinEffectFinished(long startTime, long endTime, String debug, int scrambleNum)
+  public void onWinEffectFinished(long startTime, long endTime, int scrambleNum)
     {
     if( ScreenList.getCurrentScreen()==ScreenList.SOLV )
       {
@@ -297,7 +295,7 @@ public class PlayLibInterface implements ObjectLibInterface
       TwistyObject obj = control.getObject();
       boolean submittable = obj.isSubmittable();
 
-      if( submittable ) reportRecord(act,startTime,endTime,debug,scrambleNum);
+      if( submittable ) reportRecord(act,startTime,endTime,scrambleNum);
 
       RubikScores scores = RubikScores.getInstance();
       int numWins = scores.incrementNumWins();
diff --git a/src/main/java/org/distorted/solvers/ScreenSolutionMultiphased.java b/src/main/java/org/distorted/solvers/ScreenSolutionMultiphased.java
index 968d1645..54aafbc2 100644
--- a/src/main/java/org/distorted/solvers/ScreenSolutionMultiphased.java
+++ b/src/main/java/org/distorted/solvers/ScreenSolutionMultiphased.java
@@ -353,7 +353,7 @@ public class ScreenSolutionMultiphased extends ScreenAbstract implements MovesFi
     for(int m=0; m<len; m++)
       {
       ObjectMove mv = moves[front ? start+m : end-1-m];
-      ret[m] = new ObjectMove( mv.getAxis(), mv.getRowBitmap(), front ? mv.getAngle() : -mv.getAngle() );
+      ret[m] = new ObjectMove(mv,front);
       }
 
     return ret;
@@ -378,7 +378,7 @@ public class ScreenSolutionMultiphased extends ScreenAbstract implements MovesFi
       for(int p=0; p<l; p++)
         {
         ObjectMove mve = mv[front ? p : l-1-p];
-        ret[index++] = new ObjectMove( mve.getAxis(), mve.getRowBitmap(), front ? mve.getAngle() : -mve.getAngle() );
+        ret[index++] = new ObjectMove(mve,front);
         }
       }
 
diff --git a/src/main/java/org/distorted/solvers/ScreenSolutionSinglephased.java b/src/main/java/org/distorted/solvers/ScreenSolutionSinglephased.java
index c242069b..7f153da2 100644
--- a/src/main/java/org/distorted/solvers/ScreenSolutionSinglephased.java
+++ b/src/main/java/org/distorted/solvers/ScreenSolutionSinglephased.java
@@ -191,12 +191,12 @@ public class ScreenSolutionSinglephased extends ScreenAbstract implements MovesF
         }
       else
         {
-        int bareAngle = mMoves[mCurrMove-1].getAngle();
+        ObjectMove move = mMoves[mCurrMove-1];
 
-        if( bareAngle!=0 )
+        if( move.isNonempty() )
           {
           mCanRotate = false;
-          control.addForwardRotation(this, mMoves[mCurrMove-1], MILLIS_PER_DEGREE);
+          control.addForwardRotation(this, move, MILLIS_PER_DEGREE);
           }
         else
           {
@@ -225,12 +225,12 @@ public class ScreenSolutionSinglephased extends ScreenAbstract implements MovesF
         }
       else
         {
-        int bareAngle = mMoves[mCurrMove].getAngle();
+        ObjectMove move = mMoves[mCurrMove];
 
-        if( bareAngle!=0 )
+        if( move.isNonempty() )
           {
           mCanRotate = false;
-          control.addBackwardRotation(this, mMoves[mCurrMove], MILLIS_PER_DEGREE);
+          control.addBackwardRotation(this, move, MILLIS_PER_DEGREE);
           }
         else
           {
diff --git a/src/main/java/org/distorted/solvers/SolverObjectLibInterface.java b/src/main/java/org/distorted/solvers/SolverObjectLibInterface.java
index 461ddfad..6aa9714e 100644
--- a/src/main/java/org/distorted/solvers/SolverObjectLibInterface.java
+++ b/src/main/java/org/distorted/solvers/SolverObjectLibInterface.java
@@ -45,7 +45,7 @@ public class SolverObjectLibInterface implements ObjectLibInterface
   public void failedToDrag() { }
   public void onSolved() { }
   public void onObjectCreated(long time) { }
-  public void onWinEffectFinished(long startTime, long endTime, String debug, int scrambleNum) { }
+  public void onWinEffectFinished(long startTime, long endTime, int scrambleNum) { }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
diff --git a/src/main/java/org/distorted/tutorials/TutorialObjectLibInterface.java b/src/main/java/org/distorted/tutorials/TutorialObjectLibInterface.java
index 780b755f..5a46597a 100644
--- a/src/main/java/org/distorted/tutorials/TutorialObjectLibInterface.java
+++ b/src/main/java/org/distorted/tutorials/TutorialObjectLibInterface.java
@@ -33,7 +33,7 @@ public class TutorialObjectLibInterface implements ObjectLibInterface
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  public void onWinEffectFinished(long startTime, long endTime, String debug, int scrambleNum) { }
+  public void onWinEffectFinished(long startTime, long endTime, int scrambleNum) { }
   public void onScrambleEffectFinished() { }
   public void onBeginRotation() { }
   public void onSolved() { }
