Major abstraction - automatically compute the 'computeRowFromOffset()' function from CUTS.Still one thing left: it appears like the CUTS of Mega/Kilominxes are not correct.
Abstract the next function, computeRowFromOffset(), out of the individual Movement classes.Still two issues:
1) mysterious 1.5 multiplier in Movement122) in Movement8, moving the offset works only if the rotAxis are face-turning, i.e. they connect the centers of the opposing faces of the octahedron.
Remove class referencees from ObjectList.
MOve the FOV from ObjectList to individual object classes.
Introduce abstract 4,6,8 adn 12 classes.
Move the Movement class from ObjectList to individual object classes.
Realize that the Movements of Rex, Redi, Dino and the Skewbs are all identical and convert those 4 classes into one MovementCornerTwisting.
Minor
Make computing the offset in the Movement class more correct. From now on, in the center of the face the offset if always 0 regardless of the axis.Before it would always assume that we can add DIST2D to the offset which is originated at the center of the face and this way get an offset which spans from 0 to height of the face. This is not always true - conterexample: half of the triangluar faces of an octahedron which are 'upside down'
Move actual solving the object to PreRender.
(before we had a 'solveObejct()' in preRender already, but that one just starts the Solve Effect!)
Abstract out some methods from the Movement classes. only two remain now: rowFromOffset and enabledAxis.
Make the Kilo and Megaminxes standard size (dodecahedron size=3,5, i.e. equal to numLayers so that DIST2D and DIST3D are standard)
Make the Ultimate standard size (dodecahedron size=2, i.e. equal to numLayers so that DIST2D and DIST3D are standard)
Make the Skewbs standard size (cube size=2,3, i.e. equal to numLayers so that DIST2D and DIST3D are standard)
Make Rex standard size (cube size=3, i.e. equal to numLayers so that DIST2D and DIST3D are standard)
Make Jing standard size (tetra size=2, i.e. equal to numLayers so that DIST2D and DIST3D are standard)
Make Ivy standard size (cube size=2, i.e. equal to numLayers so that DIST2D and DIST3D are standard)
Make Helicopter standard size (cube size=3, i.e. equal to numLayers so that DIST2D and DIST3D are standard)
On second thought, come back to Vector. The problem: before we had the potentially blocking function 'effectFinished' inside our synchronized block.
1) add missing call to BlockController.onPause() / onResume() to the Tutorial activity2) rearrange BlockController's error reporting to make the case where the MessageSender thread has died separate3) in such case, resurrect the thread4) simplify and harden the EffectMessageSender
Correct height of the tutorial dialog.
Add Mirror 2x2 tutorials.
Increase NODE_RATIO, i.e. the height/width ratio of the DistortedNode behind the object (before with 1.4, if one scrambled the Mirror Cube and made it the largest possible, corners were cut off form the top and bottom)
Mirror Cubes: re-enable meshes; update meshes.
Mirror Cubes: make them still more off-center.
Mirror Cubes: make them a bit more off-center.
Mirror Cubes: add meshes and icons.
Add Mirror Cube 2x2 and 3x3.
Make object scrambling abstract (well, almost - with exception of Square-1 - this theoretically could also be done the generic way, but this would require almost 20000 'ScrambleStates')
Some more debugs for the case when the UI is blocked.
safety!
Improvements for the PopupWindows: now they work:
1) on Android 11, everywhere2) on Android 10,9,8.1,8.0 - in case of fullscreen and split-screen modes; pop-up mode still does not work.3) on Android <= 7.0 : there should be no pop-up mode, so they should be working in all cases
Defer initialization of statics in RubikNetwork till we actually need them.
Remove statics from the TwistyObject class.
Fix play screen popups in case the whole app is in 'multi-window' or 'pop-up window' state.
Simplify Play Screen popups.
Make the 'Play' popup always fit within the window height.
Remove statics from the Ultimate class.
Remove statics from the Square classes.
Remove statics from the Skewb class.
Remove statics from the Rex class.
Remove statics from the Redi class.
Remove statics from the Pyraminx class.
Remove statics from the Minx classes.
Remove statics from the Jing class.
Remove statics from the Ivy class.
Remove statics from the Helicopter class.
Remove statics from the Dino classes.
Remove statics from the Diamond classes.
Remove more statics from the Bandaged Cube classes.
Remove statics from the Cube classes.
Remove statics from the Bandaged Cube classes.
Fix the problem reported by Samsung -
1. Fire off the app2. minimize it, select 'Multi window'3. put some other app in the lower half of the screen4. close the lower app5. our app used to fail to display the upper and lower menu bars.
Convert Square-2 to the new generic scrambling algorithm.
In order to do it we need to introduce a third, artificial rotational axis - otherwise the algorithm would make it impossible to rotate the lower layer and immediatelly after - the upper.
Fix the Square-2 isSolved() (it was wrong even before!)
Convert the Pyraminxes to the new scrambling paradigm.This leaves only the two Squares.
Convert the 4 Minx'es to the new scrambling paradigm.
Convert the Redi to the new scrambling paradigm.
Introduce pseudorandom balancing into scrambling to all the other already converted objects, i.e. everytihng except for Pyraminxes, Squares, Minxes and the Redi.
Introduce pseudorandom balancing into scrambling in case of the two Dinos (from now on, the more times a particular (ax,layer) combination has been chosen already in the scrambling sequence, the less likely it is to be chosen next).Fix Dino6 - isSolved(). Sadly, it cannot be the geeneric function - it needs to be another special case.
Convert the Cubes of all sizes to the new, unified scrambling method.
Convert both Dinos to the new, unified scrambling method.
Convert the Diamonds & the Helicopter to the new, unified scrambling method.
Convert Skewbs & Rex Cube to the new, unified scrambling method.
Convert Skewb Ultimate, Jing Pyraminx & Ivy Cube to the new, unified scrambling method.
Unify scrambling across all 4 bandaged objects.
Preparation for unification of scrambling. Scrambling of all objects will be done by a generic funtion, only fed a certain data structure by the objects. The data structure is going to be the ScrambleStateGraph - a directed state graph of all states we can come across while scrambling....
auto-compute the bandaged status from dimension of the CENTERS. Make 'computeBitmapFromRow' generic for bandageed and not bandaged objects.
Remove the last 'isSolved()' (from Dino4) and put it to the parent class as a special case.
Standarize the 'isSolved()' method: now all objects, except one (Dino4) have a standard isSolved().This incidentally also fixes detection of the solved state in case of Diamond4, i.e. a Master FTO.
Come back to creating the objects from mesh.
Add flag of Madagascar.
Make the 3x3 and 4x4 Diamond meshes smaller.
Finally remove cubit creation from the implementation classes and move it to the TwistyObject.
Convert the last object, Skewb Ultimate, to the new scheme.
Convert the two Squares to the new scheme.
Convert Skewb to the new scheme. New smaller mesh for the Master Skewb.
Convert Rex Cube to the new scheme.
Convert Redi Cube to the new scheme.
Convert Pyraminx to the new scheme. Make Pyra4 and Pyra5 meshes much smaller.
Convert Megaminx to the new scheme.
Move 1) Jing 2) Kilominx to the new cubit creation scheme.Make the Master Kilominx mesh a bit smaller.
Move 1) Helicopter 2) Ivy to the new cubit creation scheme.
Move 1) bandaged 3x3 2) normals cubes 3) octahedrons 4) both dinos to the new cubit creation scheme.
Important step towards making the implementation of an individual puzzle code-free (i.e. data-only): move the 'MeshBase[] mMeshes' variable from the individual classes to the parent TwistyObject.
Make the Kilominx cubit creation a bit more standard.
Introduce ObjectShape - a class encapsulating a shape of a Cubit.Make the Megaminx cubit creation a bit more standard.
Minor.
COnvert the last object, the Rex cube, to the new cubit creation scheme. Provide the new Rex mesh.
New Ivy mesh.
Convert the Ivy corner cubit to the new, 'universal' cubit creation method.
This forces deep changes to 'createRoundSolid' and the underlying 'MeshPolygon' class to make them support arbitrary Polygon 'centers of face convexity'.
Reason: the faces of this cubit are concave and such default 'center of face convexity' (which by default used to be (0,0)) turned to lie outside the face - which produces strange visual artifacts.
Corrections for the Bandaged cubit creation.
Convert bandaged Cubes to the standard mesh creation code.
Move the TwistyObject.retCubePosition() to the solver.
Standarize drawing stickers of a twisty puzzle. From now on, there's no 'sticker drawing' code in the individual classes, only some constants.
Use a trick to avoid having to correct the center sticker of the Kilominx.
Convert the last 'special' case, the Rex edge sticker, to the generic sticker mechanism.