commit 1bb09f88fb6314da2d49d0bf1b8265c0fa76c2ed
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Tue Oct 19 18:30:53 2021 +0200

    Progress with serializing object to JSON: stickers, quats.

diff --git a/src/main/java/org/distorted/objectlib/main/TwistyObject.java b/src/main/java/org/distorted/objectlib/main/TwistyObject.java
index 1df0281c..274c43c3 100644
--- a/src/main/java/org/distorted/objectlib/main/TwistyObject.java
+++ b/src/main/java/org/distorted/objectlib/main/TwistyObject.java
@@ -1134,7 +1134,8 @@ public abstract class TwistyObject extends DistortedNode
       for(int col=0; col<mNumTexCols; col++)
         {
         if( face>=NUM_TEXTURES ) break;
-        ObjectSticker sticker = retSticker(face);
+        int sIndex = getStickerIndex(face);
+        ObjectSticker sticker = retSticker(sIndex);
         factory.drawRoundedPolygon(canvas, paint, col*TEXTURE_HEIGHT, row*TEXTURE_HEIGHT, getColor(face%NUM_FACE_COLORS), sticker);
         face++;
         }
@@ -1381,18 +1382,16 @@ public abstract class TwistyObject extends DistortedNode
   protected abstract int getNumFaceColors();
   protected abstract int getColor(int face);
   protected abstract int getNumCubitFaces();
-  protected abstract Static4D[] getQuats();
   protected abstract float[][] getCubitPositions(int[] numLayers);
   protected abstract int getCubitVariant(int cubit, int[] numLayers);
   protected abstract int getNumCubitVariants(int[] numLayers);
   protected abstract Static4D getQuat(int cubit, int[] numLayers);
   protected abstract ObjectShape getObjectShape(int cubit, int[] numLayers);
   protected abstract int[] getSolvedQuats(int cubit, int[] numLayers);
-  protected abstract int getNumStickerTypes(int[] numLayers);
-  protected abstract ObjectSticker retSticker(int face);
   protected abstract int getFaceColor(int cubit, int cubitface, int[] numLayers);
   protected abstract int getResource(int[] numLayers);
   protected abstract ObjectType intGetObjectType(int[] numLayers);
+  protected abstract int getStickerIndex(int face);
 
   // for JSON only
   public abstract int getSolvedFunctionIndex();
@@ -1403,6 +1402,9 @@ public abstract class TwistyObject extends DistortedNode
   public abstract float[] getDist3D(int[] numLayers);
   public abstract ScrambleState[] getScrambleStates();
   public abstract float[][] getCuts(int[] numLayers);
+  public abstract Static4D[] getQuats();
+  public abstract int getNumStickerTypes(int[] numLayers);
+  public abstract ObjectSticker retSticker(int sticker);
 
   public abstract Static3D[] getRotationAxis();
   public abstract int[] getBasicAngle();
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java b/src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java
index 2e5cc3eb..01ad33a8 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java
@@ -260,7 +260,7 @@ abstract class TwistyBandagedAbstract extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected ObjectSticker retSticker(int face)
+  public ObjectSticker retSticker(int sticker)
     {
     if( mStickers==null )
       {
@@ -296,7 +296,14 @@ abstract class TwistyBandagedAbstract extends Twisty6
         }
       }
 
-    return mStickers[face/NUM_FACE_COLORS];
+    return mStickers[sticker];
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  protected int getStickerIndex(int face)
+    {
+    return face/NUM_FACE_COLORS;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -316,7 +323,7 @@ abstract class TwistyBandagedAbstract extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected Static4D[] getQuats()
+  public Static4D[] getQuats()
     {
     if( mQuats==null ) initializeQuats();
     return mQuats;
@@ -402,7 +409,7 @@ abstract class TwistyBandagedAbstract extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected int getNumStickerTypes(int[] numLayers)
+  public int getNumStickerTypes(int[] numLayers)
     {
     return NUM_STICKERS;
     }
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyCuboid.java b/src/main/java/org/distorted/objectlib/objects/TwistyCuboid.java
index a934b2ad..f398a75e 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyCuboid.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyCuboid.java
@@ -494,7 +494,7 @@ public class TwistyCuboid extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected ObjectSticker retSticker(int face)
+  public ObjectSticker retSticker(int sticker)
     {
     if( mStickers==null )
       {
@@ -520,12 +520,19 @@ public class TwistyCuboid extends Twisty6
       mStickers[0] = new ObjectSticker(STICKERS[0],null,radii,stroke );
       }
 
-    return mStickers[face/NUM_FACE_COLORS];
+    return mStickers[sticker];
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected Static4D[] getQuats()
+  protected int getStickerIndex(int face)
+    {
+    return face/NUM_FACE_COLORS;
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public Static4D[] getQuats()
     {
     if( mQuats ==null ) initializeQuats();
     return mQuats;
@@ -621,7 +628,7 @@ public class TwistyCuboid extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected int getNumStickerTypes(int[] numLayers)
+  public int getNumStickerTypes(int[] numLayers)
     {
     return 1;
     }
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java b/src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java
index 40e93066..411a053f 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java
@@ -142,7 +142,7 @@ public class TwistyDiamond extends Twisty8
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected Static4D[] getQuats()
+  public Static4D[] getQuats()
     {
     if( mQuats==null ) initializeQuats();
     return mQuats;
@@ -157,7 +157,7 @@ public class TwistyDiamond extends Twisty8
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected int getNumStickerTypes(int[] numLayers)
+  public int getNumStickerTypes(int[] numLayers)
     {
     return 1;
     }
@@ -525,7 +525,7 @@ public class TwistyDiamond extends Twisty8
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected ObjectSticker retSticker(int face)
+  public ObjectSticker retSticker(int sticker)
     {
     if( mStickers==null )
       {
@@ -551,7 +551,14 @@ public class TwistyDiamond extends Twisty8
       mStickers[0]  = new ObjectSticker(STICKERS[0],null,radii,stroke);
       }
 
-    return mStickers[face/NUM_FACE_COLORS];
+    return mStickers[sticker];
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  protected int getStickerIndex(int face)
+    {
+    return face/NUM_FACE_COLORS;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyDino.java b/src/main/java/org/distorted/objectlib/objects/TwistyDino.java
index eacac38a..a3b32fa7 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyDino.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyDino.java
@@ -95,7 +95,7 @@ abstract class TwistyDino extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected Static4D[] getQuats()
+  public Static4D[] getQuats()
     {
     if( mQuats==null ) initializeQuats();
     return mQuats;
@@ -164,7 +164,7 @@ abstract class TwistyDino extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected int getNumStickerTypes(int[] numLayers)
+  public int getNumStickerTypes(int[] numLayers)
     {
     return 1;
     }
@@ -241,7 +241,7 @@ abstract class TwistyDino extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected ObjectSticker retSticker(int face)
+  public ObjectSticker retSticker(int sticker)
     {
     if( mStickers==null )
       {
@@ -259,7 +259,14 @@ abstract class TwistyDino extends Twisty6
       mStickers[0]  = new ObjectSticker(STICKERS[0],null,radii,stroke);
       }
 
-    return mStickers[face/NUM_FACE_COLORS];
+    return mStickers[sticker];
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  protected int getStickerIndex(int face)
+    {
+    return face/NUM_FACE_COLORS;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java b/src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java
index d989a83e..36116ab8 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java
@@ -151,7 +151,7 @@ public class TwistyHelicopter extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected Static4D[] getQuats()
+  public Static4D[] getQuats()
     {
     if( mQuats==null ) initializeQuats();
     return mQuats;
@@ -166,7 +166,7 @@ public class TwistyHelicopter extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected int getNumStickerTypes(int[] numLayers)
+  public int getNumStickerTypes(int[] numLayers)
     {
     return 1;
     }
@@ -435,7 +435,7 @@ public class TwistyHelicopter extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected ObjectSticker retSticker(int face)
+  public ObjectSticker retSticker(int sticker)
     {
     if( mStickers==null )
       {
@@ -453,7 +453,14 @@ public class TwistyHelicopter extends Twisty6
       mStickers[0] = new ObjectSticker(STICKERS[0],null,radii,stroke);
       }
 
-    return mStickers[face/NUM_FACE_COLORS];
+    return mStickers[sticker];
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  protected int getStickerIndex(int face)
+    {
+    return face/NUM_FACE_COLORS;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyIvy.java b/src/main/java/org/distorted/objectlib/objects/TwistyIvy.java
index 9e5aa122..1a28ac71 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyIvy.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyIvy.java
@@ -127,7 +127,7 @@ public class TwistyIvy extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected Static4D[] getQuats()
+  public Static4D[] getQuats()
     {
     if( mQuats==null ) initializeQuats();
     return mQuats;
@@ -142,7 +142,7 @@ public class TwistyIvy extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected int getNumStickerTypes(int[] numLayers)
+  public int getNumStickerTypes(int[] numLayers)
     {
     return NUM_STICKERS;
     }
@@ -464,7 +464,7 @@ public class TwistyIvy extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected ObjectSticker retSticker(int face)
+  public ObjectSticker retSticker(int sticker)
     {
     if( mStickers==null )
       {
@@ -485,7 +485,14 @@ public class TwistyIvy extends Twisty6
       for(int s=0; s<NUM_STICKERS; s++) mStickers[s] = new ObjectSticker(STICKERS[s], angles[s],radii[s],strokes[s]);
       }
 
-    return mStickers[face/NUM_FACE_COLORS];
+    return mStickers[sticker];
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  protected int getStickerIndex(int face)
+    {
+    return face/NUM_FACE_COLORS;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyJing.java b/src/main/java/org/distorted/objectlib/objects/TwistyJing.java
index cbd92466..406e9d2d 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyJing.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyJing.java
@@ -158,7 +158,7 @@ public class TwistyJing extends Twisty4
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected Static4D[] getQuats()
+  public Static4D[] getQuats()
     {
     if( mQuats==null ) initializeQuats();
     return mQuats;
@@ -173,7 +173,7 @@ public class TwistyJing extends Twisty4
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected int getNumStickerTypes(int[] numLayers)
+  public int getNumStickerTypes(int[] numLayers)
     {
     return 3;
     }
@@ -412,7 +412,7 @@ public class TwistyJing extends Twisty4
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected ObjectSticker retSticker(int face)
+  public ObjectSticker retSticker(int sticker)
     {
     if( mStickers==null )
       {
@@ -443,7 +443,14 @@ public class TwistyJing extends Twisty4
         }
       }
 
-    return mStickers[face/NUM_FACE_COLORS];
+    return mStickers[sticker];
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  protected int getStickerIndex(int face)
+    {
+    return face/NUM_FACE_COLORS;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyKilominx.java b/src/main/java/org/distorted/objectlib/objects/TwistyKilominx.java
index ca3895d7..508d4c3a 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyKilominx.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyKilominx.java
@@ -101,7 +101,7 @@ public class TwistyKilominx extends TwistyMinx
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected int getNumStickerTypes(int[] numLayers)
+  public int getNumStickerTypes(int[] numLayers)
     {
     int numL = numLayers[0];
     return numL<5 ? 1 : numL/2 + 1;
@@ -650,7 +650,7 @@ public class TwistyKilominx extends TwistyMinx
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected ObjectSticker retSticker(int face)
+  public ObjectSticker retSticker(int sticker)
     {
     if( mStickers==null )
       {
@@ -698,12 +698,12 @@ public class TwistyKilominx extends TwistyMinx
         }
       }
 
-    return mStickers[getStickerIndex(face)];
+    return mStickers[sticker];
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private int getStickerIndex(int face)
+  protected int getStickerIndex(int face)
     {
     int variant = face/NUM_FACE_COLORS;
     int[] numLayers = getNumLayers();
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyMegaminx.java b/src/main/java/org/distorted/objectlib/objects/TwistyMegaminx.java
index 67e3a248..238d7b7a 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyMegaminx.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyMegaminx.java
@@ -88,7 +88,7 @@ public class TwistyMegaminx extends TwistyMinx
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected int getNumStickerTypes(int[] numLayers)
+  public int getNumStickerTypes(int[] numLayers)
     {
     return (numLayers[0]+3)/2;
     }
@@ -554,7 +554,7 @@ public class TwistyMegaminx extends TwistyMinx
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected ObjectSticker retSticker(int face)
+  public ObjectSticker retSticker(int sticker)
     {
     if( mStickers==null )
       {
@@ -595,12 +595,12 @@ public class TwistyMegaminx extends TwistyMinx
         }
       }
 
-    return mStickers[getStickerIndex(face)];
+    return mStickers[sticker];
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private int getStickerIndex(int face)
+  protected int getStickerIndex(int face)
     {
     int variant = face/NUM_FACE_COLORS;
 
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyMinx.java b/src/main/java/org/distorted/objectlib/objects/TwistyMinx.java
index 34314665..0a23f252 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyMinx.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyMinx.java
@@ -503,7 +503,7 @@ abstract class TwistyMinx extends Twisty12
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected Static4D[] getQuats()
+  public Static4D[] getQuats()
     {
     if( mQuats==null ) initializeQuats();
     return mQuats;
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyMirror.java b/src/main/java/org/distorted/objectlib/objects/TwistyMirror.java
index 8b4d1b5f..2f294b40 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyMirror.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyMirror.java
@@ -382,7 +382,7 @@ public class TwistyMirror extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected ObjectSticker retSticker(int face)
+  public ObjectSticker retSticker(int sticker)
     {
     if( mStickers==null )
       {
@@ -409,12 +409,19 @@ public class TwistyMirror extends Twisty6
         }
       }
 
-    return mStickers[face/NUM_FACE_COLORS];
+    return mStickers[sticker];
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected int getNumStickerTypes(int[] numLayers)
+  protected int getStickerIndex(int face)
+    {
+    return face/NUM_FACE_COLORS;
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public int getNumStickerTypes(int[] numLayers)
     {
     return numLayers[0]==2 ? SEQ2.length : SEQ3.length;
     }
@@ -542,7 +549,7 @@ public class TwistyMirror extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected Static4D[] getQuats()
+  public Static4D[] getQuats()
     {
     if( mQuats ==null ) initializeQuats();
     return mQuats;
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyPyraminx.java b/src/main/java/org/distorted/objectlib/objects/TwistyPyraminx.java
index c80fe9f0..c6f9d90a 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyPyraminx.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyPyraminx.java
@@ -213,7 +213,7 @@ public class TwistyPyraminx extends Twisty4
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected Static4D[] getQuats()
+  public Static4D[] getQuats()
     {
     if( mQuats==null ) initializeQuats();
     return mQuats;
@@ -228,7 +228,7 @@ public class TwistyPyraminx extends Twisty4
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected int getNumStickerTypes(int[] numLayers)
+  public int getNumStickerTypes(int[] numLayers)
     {
     return 1;
     }
@@ -404,7 +404,7 @@ public class TwistyPyraminx extends Twisty4
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected ObjectSticker retSticker(int face)
+  public ObjectSticker retSticker(int sticker)
     {
     if( mStickers==null )
       {
@@ -431,7 +431,14 @@ public class TwistyPyraminx extends Twisty4
       mStickers[0] = new ObjectSticker(STICKERS[0],null,radii,stroke);
       }
 
-    return mStickers[face/NUM_FACE_COLORS];
+    return mStickers[sticker];
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  protected int getStickerIndex(int face)
+    {
+    return face/NUM_FACE_COLORS;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyRedi.java b/src/main/java/org/distorted/objectlib/objects/TwistyRedi.java
index efa59532..8b4ba4d9 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyRedi.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyRedi.java
@@ -130,7 +130,7 @@ public class TwistyRedi extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected Static4D[] getQuats()
+  public Static4D[] getQuats()
     {
     if( mQuats==null ) initializeQuats();
     return mQuats;
@@ -145,7 +145,7 @@ public class TwistyRedi extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected int getNumStickerTypes(int[] numLayers)
+  public int getNumStickerTypes(int[] numLayers)
     {
     return 2;
     }
@@ -421,7 +421,7 @@ public class TwistyRedi extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected ObjectSticker retSticker(int face)
+  public ObjectSticker retSticker(int sticker)
     {
     if( mStickers==null )
       {
@@ -451,7 +451,14 @@ public class TwistyRedi extends Twisty6
         }
       }
 
-    return mStickers[face/NUM_FACE_COLORS];
+    return mStickers[sticker];
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  protected int getStickerIndex(int face)
+    {
+    return face/NUM_FACE_COLORS;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyRex.java b/src/main/java/org/distorted/objectlib/objects/TwistyRex.java
index 562d5c63..528b8cbc 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyRex.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyRex.java
@@ -125,7 +125,7 @@ public class TwistyRex extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected Static4D[] getQuats()
+  public Static4D[] getQuats()
     {
     if( mQuats==null ) initializeQuats();
     return mQuats;
@@ -140,7 +140,7 @@ public class TwistyRex extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected int getNumStickerTypes(int[] numLayers)
+  public int getNumStickerTypes(int[] numLayers)
     {
     return 3;
     }
@@ -450,7 +450,7 @@ public class TwistyRex extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected ObjectSticker retSticker(int face)
+  public ObjectSticker retSticker(int sticker)
     {
     if( mStickers==null )
       {
@@ -485,7 +485,14 @@ public class TwistyRex extends Twisty6
         }
       }
 
-    return mStickers[face/NUM_FACE_COLORS];
+    return mStickers[sticker];
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  protected int getStickerIndex(int face)
+    {
+    return face/NUM_FACE_COLORS;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistySkewb.java b/src/main/java/org/distorted/objectlib/objects/TwistySkewb.java
index d3649ba0..ebbcc03d 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistySkewb.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistySkewb.java
@@ -153,7 +153,7 @@ public class TwistySkewb extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected Static4D[] getQuats()
+  public Static4D[] getQuats()
     {
     if( mQuats==null ) initializeQuats();
     return mQuats;
@@ -168,7 +168,7 @@ public class TwistySkewb extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected int getNumStickerTypes(int[] numLayers)
+  public int getNumStickerTypes(int[] numLayers)
     {
     return 3;
     }
@@ -568,7 +568,7 @@ public class TwistySkewb extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected ObjectSticker retSticker(int face)
+  public ObjectSticker retSticker(int sticker)
     {
     if( mStickers==null )
       {
@@ -602,7 +602,14 @@ public class TwistySkewb extends Twisty6
         }
       }
 
-    return mStickers[face/NUM_FACE_COLORS];
+    return mStickers[sticker];
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  protected int getStickerIndex(int face)
+    {
+    return face/NUM_FACE_COLORS;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistySquare.java b/src/main/java/org/distorted/objectlib/objects/TwistySquare.java
index cd8bb015..fcbea738 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistySquare.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistySquare.java
@@ -105,7 +105,7 @@ abstract class TwistySquare extends Twisty6
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected Static4D[] getQuats()
+  public Static4D[] getQuats()
     {
     if( mQuats==null ) initializeQuats();
     return mQuats;
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistySquare1.java b/src/main/java/org/distorted/objectlib/objects/TwistySquare1.java
index 1e32123c..18094c37 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistySquare1.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistySquare1.java
@@ -222,7 +222,7 @@ public class TwistySquare1 extends TwistySquare
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected ObjectSticker retSticker(int face)
+  public ObjectSticker retSticker(int sticker)
     {
     if( mStickers==null )
       {
@@ -264,7 +264,14 @@ public class TwistySquare1 extends TwistySquare
         }
       }
 
-    return mStickers[face/NUM_FACE_COLORS];
+    return mStickers[sticker];
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  protected int getStickerIndex(int face)
+    {
+    return face/NUM_FACE_COLORS;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -309,7 +316,7 @@ public class TwistySquare1 extends TwistySquare
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected int getNumStickerTypes(int[] numLayers)
+  public int getNumStickerTypes(int[] numLayers)
     {
     return NUM_STICKERS;
     }
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistySquare2.java b/src/main/java/org/distorted/objectlib/objects/TwistySquare2.java
index 599d18b0..eef82768 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistySquare2.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistySquare2.java
@@ -227,7 +227,7 @@ public class TwistySquare2 extends TwistySquare
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected ObjectSticker retSticker(int face)
+  public ObjectSticker retSticker(int sticker)
     {
     if( mStickers==null )
       {
@@ -269,7 +269,14 @@ public class TwistySquare2 extends TwistySquare
         }
       }
 
-    return mStickers[face/NUM_FACE_COLORS];
+    return mStickers[sticker];
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  protected int getStickerIndex(int face)
+    {
+    return face/NUM_FACE_COLORS;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -326,7 +333,7 @@ public class TwistySquare2 extends TwistySquare
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected int getNumStickerTypes(int[] numLayers)
+  public int getNumStickerTypes(int[] numLayers)
     {
     return NUM_STICKERS;
     }
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyUltimate.java b/src/main/java/org/distorted/objectlib/objects/TwistyUltimate.java
index e7585c9e..698adda6 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyUltimate.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyUltimate.java
@@ -321,7 +321,7 @@ public class TwistyUltimate extends Twisty12
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected ObjectSticker retSticker(int face)
+  public ObjectSticker retSticker(int sticker)
     {
     if( mStickers==null )
       {
@@ -354,12 +354,19 @@ public class TwistyUltimate extends Twisty12
         }
       }
 
-    return mStickers[face/NUM_FACE_COLORS];
+    return mStickers[sticker];
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected Static4D[] getQuats()
+  protected int getStickerIndex(int face)
+    {
+    return face/NUM_FACE_COLORS;
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public Static4D[] getQuats()
     {
     if( mQuats==null ) initializeQuats();
     return mQuats;
@@ -434,7 +441,7 @@ public class TwistyUltimate extends Twisty12
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  protected int getNumStickerTypes(int[] numLayers)
+  public int getNumStickerTypes(int[] numLayers)
     {
     return 3;
     }
