Wiki » History » Revision 15
Revision 14 (Distorted Admin, 04/16/2020 12:49 PM) → Revision 15/61 (Distorted Admin, 04/16/2020 12:49 PM)
h1. Overview
Magic Cube is an application which lets one play with Cubes and Pyraminxes of any size. It contains graphhics effects provided by the "Distorted":https://distorted.org/redmine/projects/distorted-android/wiki/wiki library.
Users can submit their best times to a central High Scores list and download results made by others.
A 3x3x3 Cube solver and a Pretty Patterns tutorial is in the plans.
Magic Cube is open source and released under the terms of the "GNU General Public License v2":http://www.gnu.org/licenses/old-licenses/gpl-2.0.html (GPL).
h1. Source code
<pre>
git clone http://distorted.org/git/distorted-library.git
git clone http://distorted.org/git/distorted-cube.git
</pre>
h1. Tutorials
h2. How to add a new Rubik Object
* Write a new class which extends "RubikObject":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/object/RubikObject.java
* Write a new class which extends "RubikObjectMovement":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/object/RubikObjectMovement.java
* add your new classes to the "RubikObjectList":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/object/RubikObjectList.java enum
Currently implemented Objects: a "Cube":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/object/RubikCube.java and a "Pyraminx":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/object/RubikPyraminx.java.
h2. How to add a new Transition Effect
If you would like to add, say, a new WIN effect (i.e. animation which happens when the Object gets solved) all you need to do is add a new class which extends "org.distorted.effect.WinEffect":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/effect/win/WinEffect.java and add the new class to the "org.distorted.effect.WinEffect.Type":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/effects/win/WinEffect.java enum.
The new effect will automatically become available in the Effects dialog.
Magic Cube is an application which lets one play with Cubes and Pyraminxes of any size. It contains graphhics effects provided by the "Distorted":https://distorted.org/redmine/projects/distorted-android/wiki/wiki library.
Users can submit their best times to a central High Scores list and download results made by others.
A 3x3x3 Cube solver and a Pretty Patterns tutorial is in the plans.
Magic Cube is open source and released under the terms of the "GNU General Public License v2":http://www.gnu.org/licenses/old-licenses/gpl-2.0.html (GPL).
h1. Source code
<pre>
git clone http://distorted.org/git/distorted-library.git
git clone http://distorted.org/git/distorted-cube.git
</pre>
h1. Tutorials
h2. How to add a new Rubik Object
* Write a new class which extends "RubikObject":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/object/RubikObject.java
* Write a new class which extends "RubikObjectMovement":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/object/RubikObjectMovement.java
* add your new classes to the "RubikObjectList":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/object/RubikObjectList.java enum
Currently implemented Objects: a "Cube":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/object/RubikCube.java and a "Pyraminx":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/object/RubikPyraminx.java.
h2. How to add a new Transition Effect
If you would like to add, say, a new WIN effect (i.e. animation which happens when the Object gets solved) all you need to do is add a new class which extends "org.distorted.effect.WinEffect":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/effect/win/WinEffect.java and add the new class to the "org.distorted.effect.WinEffect.Type":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/effects/win/WinEffect.java enum.
The new effect will automatically become available in the Effects dialog.