Revision 7bdd481b
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/dialogs/RubikDialogWhatsNew.java | ||
---|---|---|
119 | 119 |
pM.setMargins(0,2*margin,0,0); |
120 | 120 |
|
121 | 121 |
RubikActivity ract = (RubikActivity) getContext(); |
122 |
int start = findVersion(mArgument); |
|
123 | 122 |
int numMessages= MESSAGES.length/2; |
124 | 123 |
String thisVersion = findCurrentVersion(ract); |
125 | 124 |
|
126 | 125 |
for(int i=0; i<numMessages; i++) |
127 | 126 |
{ |
128 |
String version = MESSAGES[start+2*i];
|
|
129 |
String message = MESSAGES[start+2*i+1];
|
|
127 |
String version = MESSAGES[2*i]; |
|
128 |
String message = MESSAGES[2*i+1]; |
|
130 | 129 |
boolean isCurrent = version.equals(thisVersion); |
131 | 130 |
|
132 | 131 |
RubikDialogWhatsNewView pane = new RubikDialogWhatsNewView(ract,version,message,padd, isCurrent, (i==(numMessages-1) ? pL:pV),pT,pM); |
src/main/java/org/distorted/solvers/ImplementedSolversList.java | ||
---|---|---|
17 | 17 |
public enum ImplementedSolversList |
18 | 18 |
{ |
19 | 19 |
CUBE3_KOCIEMBA (ObjectSignatures.CUBE_3, R.string.solver_cube3_title, R.string.solver_cube3_description, true), |
20 |
PYRAMINX_DUO (ObjectSignatures.PDUO_2, R.string.solver_pduo2_title, R.string.solver_pduo2_description, false), |
|
20 | 21 |
PYRAMINX (ObjectSignatures.PYRA_3, R.string.solver_pyra3_title, R.string.solver_pyra3_description, false), |
21 | 22 |
IVY (ObjectSignatures.IVY_2 , R.string.solver_ivy_title, R.string.solver_ivy_description, false), |
22 | 23 |
TOWER (ObjectSignatures.CU_232, R.string.solver_cu232_title, R.string.solver_cu232_description, false), |
src/main/java/org/distorted/solvers/SolverTablebase.java | ||
---|---|---|
23 | 23 |
|
24 | 24 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
25 | 25 |
|
26 |
public abstract String constructError(); |
|
26 |
public abstract String constructError(Resources res);
|
|
27 | 27 |
public abstract int[] prepareQuats(TwistyObject object); |
28 | 28 |
public abstract String solution(int[] quats, Resources res); |
29 | 29 |
|
... | ... | |
52 | 52 |
} |
53 | 53 |
else |
54 | 54 |
{ |
55 |
String error = constructError(); |
|
55 |
String error = constructError(mRes);
|
|
56 | 56 |
solver.displayErrorDialog(error); |
57 | 57 |
} |
58 | 58 |
} |
src/main/java/org/distorted/solvers/pduo/SolverPyraminxDuo.java | ||
---|---|---|
18 | 18 |
|
19 | 19 |
public class SolverPyraminxDuo extends SolverTablebase |
20 | 20 |
{ |
21 |
private static final int ERROR_CORNER_GYB_MISSING = 0; |
|
22 |
private static final int ERROR_CORNER_GYR_MISSING = 1; |
|
23 |
private static final int ERROR_CORNER_GBR_MISSING = 2; |
|
24 |
private static final int ERROR_CORNER_YBR_MISSING = 3; |
|
25 |
|
|
26 |
private static final int ERROR_CENTER_G_MISSING = 4; |
|
27 |
private static final int ERROR_CENTER_Y_MISSING = 5; |
|
28 |
private static final int ERROR_CENTER_B_MISSING = 6; |
|
29 |
private static final int ERROR_CENTER_R_MISSING = 7; |
|
30 |
|
|
21 | 31 |
private int mErrorID; |
22 | 32 |
|
23 | 33 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
28 | 38 |
} |
29 | 39 |
|
30 | 40 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
31 |
// TODO |
|
32 |
public String constructError() |
|
41 |
|
|
42 |
public String constructError(Resources res)
|
|
33 | 43 |
{ |
34 | 44 |
return null; |
35 | 45 |
} |
36 | 46 |
|
37 | 47 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
38 |
// TODO |
|
48 |
|
|
39 | 49 |
public int[] prepareQuats(TwistyObject object) |
40 | 50 |
{ |
41 |
return null; |
|
51 |
int c0f0 = object.getCubitFaceColorIndex(0,0); |
|
52 |
int c0f1 = object.getCubitFaceColorIndex(0,1); |
|
53 |
int c0f2 = object.getCubitFaceColorIndex(0,2); |
|
54 |
|
|
55 |
int c1f0 = object.getCubitFaceColorIndex(1,0); |
|
56 |
int c1f1 = object.getCubitFaceColorIndex(1,1); |
|
57 |
int c1f2 = object.getCubitFaceColorIndex(1,2); |
|
58 |
|
|
59 |
int c2f0 = object.getCubitFaceColorIndex(2,0); |
|
60 |
int c2f1 = object.getCubitFaceColorIndex(2,1); |
|
61 |
int c2f2 = object.getCubitFaceColorIndex(2,2); |
|
62 |
|
|
63 |
int c3f0 = object.getCubitFaceColorIndex(3,0); |
|
64 |
int c3f1 = object.getCubitFaceColorIndex(3,1); |
|
65 |
int c3f2 = object.getCubitFaceColorIndex(3,2); |
|
66 |
|
|
67 |
int c4f0 = object.getCubitFaceColorIndex(4,0); |
|
68 |
int c5f0 = object.getCubitFaceColorIndex(5,0); |
|
69 |
int c6f0 = object.getCubitFaceColorIndex(6,0); |
|
70 |
int c7f0 = object.getCubitFaceColorIndex(3,0); |
|
71 |
|
|
72 |
android.util.Log.e("D", "tip 0: "+c0f0+" "+c0f1+" "+c0f2); |
|
73 |
android.util.Log.e("D", "tip 1: "+c1f0+" "+c1f1+" "+c1f2); |
|
74 |
android.util.Log.e("D", "tip 2: "+c2f0+" "+c2f1+" "+c2f2); |
|
75 |
android.util.Log.e("D", "tip 3: "+c3f0+" "+c3f1+" "+c3f2); |
|
76 |
|
|
77 |
android.util.Log.e("D", "center 0: "+c4f0); |
|
78 |
android.util.Log.e("D", "center 1: "+c5f0); |
|
79 |
android.util.Log.e("D", "center 2: "+c6f0); |
|
80 |
android.util.Log.e("D", "center 3: "+c7f0); |
|
81 |
|
|
82 |
return new int[] {0,0,0,0,0,0}; |
|
42 | 83 |
} |
43 | 84 |
|
44 | 85 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
45 |
// TODO |
|
86 |
|
|
46 | 87 |
public String solution(int[] quats, Resources res) |
47 | 88 |
{ |
48 |
return null;
|
|
89 |
return "";
|
|
49 | 90 |
} |
50 | 91 |
} |
51 | 92 |
|
src/main/java/org/distorted/solvers/pduo/TablebasesPyraminxDuo.java | ||
---|---|---|
1 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
2 |
// Copyright 2023 Leszek Koltunski // |
|
3 |
// // |
|
4 |
// This file is part of Magic Cube. // |
|
5 |
// // |
|
6 |
// Magic Cube is proprietary software licensed under an EULA which you should have received // |
|
7 |
// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html // |
|
8 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
9 |
|
|
10 |
package org.distorted.solvers.pduo; |
|
11 |
|
|
12 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
13 |
|
|
14 |
public class TablebasesPyraminxDuo |
|
15 |
{ |
|
16 |
|
|
17 |
} |
|
18 |
|
src/main/res/values-de/strings.xml | ||
---|---|---|
98 | 98 |
<string name="color_orange">orange</string> |
99 | 99 |
|
100 | 100 |
<string name="solver_cube3_description">Ein nahezu perfekter, sofortiger, zweiphasiger 3x3x3-Löser.\nAutor: Herbert Kociemba.</string> |
101 |
<string name="solver_pduo2_description">Noch nicht implementiert.\nAutor: Leszek Koltunski.</string> |
|
101 | 102 |
<string name="solver_pyra3_description">Noch nicht implementiert.\nAutor: Leszek Koltunski.</string> |
102 | 103 |
<string name="solver_ivy_description">Noch nicht implementiert.\nAutor: Leszek Koltunski.</string> |
103 | 104 |
<string name="solver_cu232_description">Noch nicht implementiert.\nAutor: Leszek Koltunski.</string> |
src/main/res/values-es/strings.xml | ||
---|---|---|
98 | 98 |
<string name="color_orange">naranjas</string> |
99 | 99 |
|
100 | 100 |
<string name="solver_cube3_description">Un 3x3x3 solucionador casi perfecto, instantáneo, de dos fases.\nAutor: Herbert Kociemba.</string> |
101 |
<string name="solver_pduo2_description">Aun no implementado.\nAutor: Leszek Koltunski.</string> |
|
101 | 102 |
<string name="solver_pyra3_description">Aun no implementado.\nAutor: Leszek Koltunski.</string> |
102 | 103 |
<string name="solver_ivy_description">Aun no implementado.\nAutor: Leszek Koltunski.</string> |
103 | 104 |
<string name="solver_cu232_description">Aun no implementado.\nAutor: Leszek Koltunski.</string> |
src/main/res/values-fr/strings.xml | ||
---|---|---|
98 | 98 |
<string name="color_orange">orange</string> |
99 | 99 |
|
100 | 100 |
<string name="solver_cube3_description">Un solveur 3x3x3 biphasé presque parfait, instantané.\nAuteur: Herbert Kociemba.</string> |
101 |
<string name="solver_pduo2_description">Pas encore mis en œuvre.\nAuteur: Leszek Koltunski.</string> |
|
101 | 102 |
<string name="solver_pyra3_description">Pas encore mis en œuvre.\nAuteur: Leszek Koltunski.</string> |
102 | 103 |
<string name="solver_ivy_description">Pas encore mis en œuvre.\nAuteur: Leszek Koltunski.</string> |
103 | 104 |
<string name="solver_cu232_description">Pas encore mis en œuvre.\nAuteur: Leszek Koltunski.</string> |
src/main/res/values-ja/strings.xml | ||
---|---|---|
99 | 99 |
<string name="color_orange">オレンジ色の</string> |
100 | 100 |
|
101 | 101 |
<string name="solver_cube3_description">ほぼ完璧で瞬間的な 2 フェーズ 3x3x3 ソルバー。\n著者: Herbert Kociemba.</string> |
102 |
<string name="solver_pduo2_description">まだ実装されていません。\n著者: Leszek Koltunski.</string> |
|
102 | 103 |
<string name="solver_pyra3_description">まだ実装されていません。\n著者: Leszek Koltunski.</string> |
103 | 104 |
<string name="solver_ivy_description">まだ実装されていません。\n著者: Leszek Koltunski.</string> |
104 | 105 |
<string name="solver_cu232_description">まだ実装されていません。\n著者: Leszek Koltunski.</string> |
src/main/res/values-ko/strings.xml | ||
---|---|---|
98 | 98 |
<string name="color_orange">주황색</string> |
99 | 99 |
|
100 | 100 |
<string name="solver_cube3_description">거의 완벽하고 즉각적인 2상 3x3x3 솔버입니다.\n작가: Herbert Kociemba.</string> |
101 |
<string name="solver_pduo2_description">아직 구현되지 않음\n작가: Leszek Koltunski.</string> |
|
101 | 102 |
<string name="solver_pyra3_description">아직 구현되지 않음\n작가: Leszek Koltunski.</string> |
102 | 103 |
<string name="solver_ivy_description">아직 구현되지 않음\n작가: Leszek Koltunski.</string> |
103 | 104 |
<string name="solver_cu232_description">아직 구현되지 않음\n작가: Leszek Koltunski.</string> |
src/main/res/values-pl/strings.xml | ||
---|---|---|
98 | 98 |
<string name="color_orange">pomarańczowych</string> |
99 | 99 |
|
100 | 100 |
<string name="solver_cube3_description">Natychmiastowy, prawie perfekcyjny rozwiązywacz kostki 3x3x3.\nAutor: Herbert Kociemba.</string> |
101 |
<string name="solver_pduo2_description">Jeszcze nie zaimplementowany.\nAutor: Leszek Koltunski.</string> |
|
101 | 102 |
<string name="solver_pyra3_description">Jeszcze nie zaimplementowany.\nAutor: Leszek Koltunski.</string> |
102 | 103 |
<string name="solver_ivy_description">Jeszcze nie zaimplementowany.\nAutor: Leszek Koltunski.</string> |
103 | 104 |
<string name="solver_cu232_description">Jeszcze nie zaimplementowany.\nAutor: Leszek Koltunski.</string> |
src/main/res/values-ru/strings.xml | ||
---|---|---|
98 | 98 |
<string name="color_orange">оранжевых</string> |
99 | 99 |
|
100 | 100 |
<string name="solver_cube3_description">Практически идеальный, мгновенный, двухфазный решатель 3x3x3.\nАвтор: Herbert Kociemba.</string> |
101 |
<string name="solver_pduo2_description">Еще не реализован.\nАвтор: Leszek Koltunski.</string> |
|
101 | 102 |
<string name="solver_pyra3_description">Еще не реализован.\nАвтор: Leszek Koltunski.</string> |
102 | 103 |
<string name="solver_ivy_description">Еще не реализован.\nАвтор: Leszek Koltunski.</string> |
103 | 104 |
<string name="solver_cu232_description">Еще не реализован.\nАвтор: Leszek Koltunski.</string> |
src/main/res/values-zh-rCN/strings.xml | ||
---|---|---|
104 | 104 |
<string name="color_orange">橙色的</string> |
105 | 105 |
|
106 | 106 |
<string name="solver_cube3_description">一个几乎完美的、瞬时的、两相的3x3x3解算器。\n作者: Herbert Kociemba.</string> |
107 |
<string name="solver_pduo2_description">尚未实施。\n作者: Leszek Koltunski.</string> |
|
107 | 108 |
<string name="solver_pyra3_description">尚未实施。\n作者: Leszek Koltunski.</string> |
108 | 109 |
<string name="solver_ivy_description">尚未实施。\n作者: Leszek Koltunski.</string> |
109 | 110 |
<string name="solver_cu232_description">尚未实施。\n作者: Leszek Koltunski.</string> |
src/main/res/values-zh-rTW/strings.xml | ||
---|---|---|
98 | 98 |
<string name="color_orange">橙色的</string> |
99 | 99 |
|
100 | 100 |
<string name="solver_cube3_description">一個近乎完美的瞬時兩相 3x3x3 求解器。\n作者: Herbert Kociemba.</string> |
101 |
<string name="solver_pduo2_description">尚未實現。\n作者: Leszek Koltunski.</string> |
|
101 | 102 |
<string name="solver_pyra3_description">尚未實現。\n作者: Leszek Koltunski.</string> |
102 | 103 |
<string name="solver_ivy_description">尚未實現。\n作者: Leszek Koltunski.</string> |
103 | 104 |
<string name="solver_cu232_description">尚未實現。\n作者: Leszek Koltunski.</string> |
src/main/res/values/strings.xml | ||
---|---|---|
118 | 118 |
<string name="color_orange">orange</string> |
119 | 119 |
|
120 | 120 |
<string name="solver_cube3_title" translatable="false">Kociemba 3x3 Solver</string> |
121 |
<string name="solver_pduo2_title" translatable="false">Pyraminx Duo Solver</string> |
|
121 | 122 |
<string name="solver_pyra3_title" translatable="false">Pyraminx Solver</string> |
122 | 123 |
<string name="solver_ivy_title" translatable="false">Ivy Solver</string> |
123 | 124 |
<string name="solver_cu232_title" translatable="false">2x2x3 Cuboid Solver</string> |
124 | 125 |
<string name="solver_diam2_title" translatable="false">Skewb Diamond Solver</string> |
125 | 126 |
|
126 | 127 |
<string name="solver_cube3_description">A near-perfect, instantaneous, two-phase 3x3x3 solver.\nAuthor: Herbert Kociemba.</string> |
128 |
<string name="solver_pduo2_description">Not implemented yet.\nAuthor: Leszek Koltunski.</string> |
|
127 | 129 |
<string name="solver_pyra3_description">Not implemented yet.\nAuthor: Leszek Koltunski.</string> |
128 | 130 |
<string name="solver_ivy_description">Not implemented yet.\nAuthor: Leszek Koltunski.</string> |
129 | 131 |
<string name="solver_cu232_description">Not implemented yet.\nAuthor: Leszek Koltunski.</string> |
Also available in: Unified diff
- add the Pyraminx Duo solver to the list
- make the signature of an object independent of its location in the ObjectType enum