Wiki » History » Version 30
Distorted Admin, 04/16/2020 01:10 PM
1 | 2 | Distorted Admin | h1. Overview |
---|---|---|---|
2 | 1 | Distorted Admin | |
3 | 6 | Distorted Admin | 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. |
4 | 5 | Distorted Admin | Users can submit their best times to a central High Scores list and download results made by others. |
5 | A 3x3x3 Cube solver and a Pretty Patterns tutorial is in the plans. |
||
6 | |||
7 | 2 | Distorted Admin | 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). |
8 | 1 | Distorted Admin | |
9 | 2 | Distorted Admin | h1. Source code |
10 | 1 | Distorted Admin | |
11 | 2 | Distorted Admin | <pre> |
12 | 1 | Distorted Admin | git clone http://distorted.org/git/distorted-library.git |
13 | git clone http://distorted.org/git/distorted-cube.git |
||
14 | 2 | Distorted Admin | </pre> |
15 | 3 | Distorted Admin | |
16 | h1. Tutorials |
||
17 | 13 | Distorted Admin | |
18 | 30 | Distorted Admin | |
19 | 3 | Distorted Admin | h2. How to add a new Rubik Object |
20 | |||
21 | 21 | Distorted Admin | * Write a new class which extends "RubikObject":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/objects/RubikObject.java |
22 | 22 | Distorted Admin | * Write a new class which extends "RubikObjectMovement":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/objects/RubikObjectMovement.java |
23 | 23 | Distorted Admin | * add your new classes to the "RubikObjectList":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/objects/RubikObjectList.java enum (here you will also need to provide a small icon to add to the "play" drop-down object list) |
24 | 20 | Distorted Admin | |
25 | and your new Object will automatically become available in the "Play" drop-down list. |
||
26 | 3 | Distorted Admin | |
27 | 24 | Distorted Admin | Currently implemented Objects: a "Cube":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/objects/RubikCube.java and a "Pyraminx":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/objects/RubikPyraminx.java. |
28 | 3 | Distorted Admin | |
29 | 30 | Distorted Admin | |
30 | 3 | Distorted Admin | h2. How to add a new Transition Effect |
31 | |||
32 | 25 | Distorted Admin | 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/effects/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. |
33 | 15 | Distorted Admin | |
34 | 16 | Distorted Admin | The new effect will automatically become available in the "Effects dialog":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/dialogs/RubikDialogEffects.java. |
35 | 17 | Distorted Admin | |
36 | 30 | Distorted Admin | |
37 | 17 | Distorted Admin | h2. How to add a new Pretty Pattern |
38 | |||
39 | 26 | Distorted Admin | If you've got a collection of Pretty Patterns for a given (already implemented!) RubikObject, say a Pyraminx 3x3x3, all you need to do to connect it to the Magic Cube is to create a table of Strings describing the patterns ( format needs to follow the one already done in "Cube Patterns":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/patterns/RubikPatternCube3.java ) and add the new pattern list to the "org.distorted.patterns.RubikPatternList":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/patterns/RubikPatternList.java enum. |
40 | 17 | Distorted Admin | |
41 | The new list of Patterns will automatically become available in the "Patterns dialog":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/dialogs/RubikDialogPattern.java. |
||
42 | 18 | Distorted Admin | |
43 | 30 | Distorted Admin | |
44 | 18 | Distorted Admin | h2. How to add a new Solver |
45 | 1 | Distorted Admin | |
46 | 30 | Distorted Admin | Work in the "org.distorted.solvers":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/show/src/main/java/org/distorted package. First create a subdirectory containing the code of your actual solver, then connect it to the rest of the program by modifying the "org.distorted.solvers.SolverMain":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/solvers/SolverMain.java class, and finally add the new solver to the "org.distorted.solvers.ImplementedSolversList":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/entry/src/main/java/org/distorted/solvers/ImplementedSolversList.java enum. |
47 | 18 | Distorted Admin | |
48 | 19 | Distorted Admin | Currently implemented solvers: "a near-perfect, instantenous Cube3 solver":https://distorted.org/redmine/projects/magic-cube/repository/magiccube/revisions/master/show/src/main/java/org/distorted/solvers/cube3. |