Revision d433b50e
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/tutorials/TutorialList.java | ||
---|---|---|
19 | 19 |
|
20 | 20 |
package org.distorted.tutorials; |
21 | 21 |
|
22 |
import org.distorted.objectlib.main.ObjectType; |
|
23 | 22 |
import org.distorted.main.RubikActivity; |
23 |
import org.distorted.objectlib.main.ObjectConstants; |
|
24 |
import org.distorted.objects.RubikObject; |
|
25 |
import org.distorted.objects.RubikObjectList; |
|
24 | 26 |
|
25 | 27 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
26 | 28 |
|
27 | 29 |
public enum TutorialList |
28 | 30 |
{ |
29 |
CUBE2 ( ObjectType.CUBE_2,
|
|
31 |
CUBE2 ( ObjectConstants.CUBE_2,
|
|
30 | 32 |
new String[][] { |
31 | 33 |
{"gb","rJlh5p2wAKA","How to Solve a 2x2 Rubik's Cube","Z3"}, |
32 | 34 |
{"es","f85wqJTIDlw","Resolver cubo de Rubik 2X2","Cuby"}, |
... | ... | |
39 | 41 |
} |
40 | 42 |
), |
41 | 43 |
|
42 |
CUBE3 ( ObjectType.CUBE_3,
|
|
44 |
CUBE3 ( ObjectConstants.CUBE_3,
|
|
43 | 45 |
new String[][] { |
44 | 46 |
{"gb","-8ohoCKN0Zw","How to Solve a Rubik's Cube","Z3"}, |
45 | 47 |
{"es","GyY0OxDk5lI","Resolver cubo de Rubik 3x3","Cuby"}, |
... | ... | |
54 | 56 |
} |
55 | 57 |
), |
56 | 58 |
|
57 |
CUBE4 ( ObjectType.CUBE_4,
|
|
59 |
CUBE4 ( ObjectConstants.CUBE_4,
|
|
58 | 60 |
new String[][] { |
59 | 61 |
{"gb","RR77Md71Ymc","How to Solve the 4x4 Rubik's Cube","Z3"}, |
60 | 62 |
{"es","d_4xk1r9hxU","Resolver cubo de Rubik 4x4","Cuby"}, |
... | ... | |
71 | 73 |
} |
72 | 74 |
), |
73 | 75 |
|
74 |
CUBE5 ( ObjectType.CUBE_5,
|
|
76 |
CUBE5 ( ObjectConstants.CUBE_5,
|
|
75 | 77 |
new String[][] { |
76 | 78 |
{"gb","zMkNkXHzQts","How to Solve the 5x5 Rubik's Cube","Z3"}, |
77 | 79 |
{"es","6uaq-xfFs98","Resolver cubo de Rubik 5x5","Cuby"}, |
... | ... | |
83 | 85 |
} |
84 | 86 |
), |
85 | 87 |
|
86 |
CUBE6 ( ObjectType.CUBE_6,
|
|
88 |
CUBE6 ( ObjectConstants.CUBE_6,
|
|
87 | 89 |
new String[][] { |
88 | 90 |
{"gb","SkZ9UadAOvQ","How to Solve the 6x6 Rubik's Cube","JPerm"}, |
89 | 91 |
{"es","9X-mW6wbnQQ","Resolver cubo de Rubik 6x6","Cuby"}, |
... | ... | |
95 | 97 |
} |
96 | 98 |
), |
97 | 99 |
|
98 |
CUBE7 ( ObjectType.CUBE_7,
|
|
100 |
CUBE7 ( ObjectConstants.CUBE_7,
|
|
99 | 101 |
new String[][] { |
100 | 102 |
{"gb","xpI7jKs4bWQ","7x7 Centers (1/2)","CubeSkills"}, |
101 | 103 |
{"gb","xpI7jKs4bWQ","7x7 Edges & 3x3 Stage (2/2)","CubeSkills"}, |
... | ... | |
108 | 110 |
} |
109 | 111 |
), |
110 | 112 |
|
111 |
MIRR2 ( ObjectType.MIRR_2,
|
|
113 |
MIRR2 ( ObjectConstants.MIRR_2,
|
|
112 | 114 |
new String[][] { |
113 | 115 |
{"gb","rSH-ZEqTmxs","Solve 2x2 Mirror Blocks","King of Cubing"}, |
114 | 116 |
{"es","Ipz-Ajpd4Fg","Como resolver el mirror 2x2","RUBI CUBI"}, |
... | ... | |
119 | 121 |
} |
120 | 122 |
), |
121 | 123 |
|
122 |
MIRR3 ( ObjectType.MIRR_3,
|
|
124 |
MIRR3 ( ObjectConstants.MIRR_3,
|
|
123 | 125 |
new String[][] { |
124 | 126 |
{"gb","YkzXIWnqbSw","How to Solve the Mirror Cube","Z3"}, |
125 | 127 |
{"es","ZTkunMo51l0","Resolver cubo de Rubik MIRROR","Cuby"}, |
... | ... | |
131 | 133 |
} |
132 | 134 |
), |
133 | 135 |
|
134 |
JING ( ObjectType.JING_2,
|
|
136 |
JING ( ObjectConstants.JING_2,
|
|
135 | 137 |
new String[][] { |
136 | 138 |
{"gb","0T8Iw6aI2gA","Jing's Pyraminx Tutorial","SuperAntoniovivaldi"}, |
137 | 139 |
{"es","Na27_GUIzqY","Resolver Jing Pyraminx","Cuby"}, |
... | ... | |
142 | 144 |
} |
143 | 145 |
), |
144 | 146 |
|
145 |
PYRA3 ( ObjectType.PYRA_3,
|
|
147 |
PYRA3 ( ObjectConstants.PYRA_3,
|
|
146 | 148 |
new String[][] { |
147 | 149 |
{"gb","xIQtn2qazvg","Pyraminx Layer By Layer","Z3"}, |
148 | 150 |
{"es","4cJJe9RAzAU","Resolver Pyraminx","Cuby"}, |
... | ... | |
155 | 157 |
} |
156 | 158 |
), |
157 | 159 |
|
158 |
PYRA4 ( ObjectType.PYRA_4,
|
|
160 |
PYRA4 ( ObjectConstants.PYRA_4,
|
|
159 | 161 |
new String[][] { |
160 | 162 |
{"gb","tGQDqDcSa6U","How to Solve the Master Pyraminx","Z3"}, |
161 | 163 |
{"es","74PIPm9-uPg","Resolver Master Pyraminx 4x4","Cuby"}, |
... | ... | |
167 | 169 |
} |
168 | 170 |
), |
169 | 171 |
|
170 |
PYRA5 ( ObjectType.PYRA_5,
|
|
172 |
PYRA5 ( ObjectConstants.PYRA_5,
|
|
171 | 173 |
new String[][] { |
172 | 174 |
{"gb","2nsPEECDdN0","Professor Pyraminx Solve","RedKB"}, |
173 | 175 |
{"es","cSDj8OQK3TU","Tutorial del Professor Pyraminx","QBAndo"}, |
... | ... | |
177 | 179 |
} |
178 | 180 |
), |
179 | 181 |
|
180 |
KILO3( ObjectType.KILO_3,
|
|
182 |
KILO3( ObjectConstants.KILO_3,
|
|
181 | 183 |
new String[][] { |
182 | 184 |
{"gb","grgGgUSxiQg","How to Solve the Kilominx","Z3"}, |
183 | 185 |
{"es","g6WMYjkCLok","Resolver Kilominx","Cuby"}, |
... | ... | |
189 | 191 |
} |
190 | 192 |
), |
191 | 193 |
|
192 |
KILO5( ObjectType.KILO_5,
|
|
194 |
KILO5( ObjectConstants.KILO_5,
|
|
193 | 195 |
new String[][] { |
194 | 196 |
{"gb","VAnzC2SYVc4","How To Solve A Master Kilominx","Grizz Media"}, |
195 | 197 |
{"es","ozINTg-61Fs","Tutorial Master Kilominx","RubikArt"}, |
... | ... | |
204 | 206 |
} |
205 | 207 |
), |
206 | 208 |
|
207 |
MEGA3( ObjectType.MEGA_3,
|
|
209 |
MEGA3( ObjectConstants.MEGA_3,
|
|
208 | 210 |
new String[][] { |
209 | 211 |
{"gb","j4x61L5Onzk","How to Solve the Megaminx","Z3"}, |
210 | 212 |
{"es","xuKbT6Il0Ko","Resolver Megaminx","Cuby"}, |
... | ... | |
216 | 218 |
} |
217 | 219 |
), |
218 | 220 |
|
219 |
MEGA5( ObjectType.MEGA_5,
|
|
221 |
MEGA5( ObjectConstants.MEGA_5,
|
|
220 | 222 |
new String[][] { |
221 | 223 |
{"gb","MNBMm8BnHtQ","Solve the Gigaminx Part 1","BeardedCubing"}, |
222 | 224 |
{"gb","QrrP4GwqVMw","Solve the Gigaminx Part 2","BeardedCubing"}, |
... | ... | |
234 | 236 |
} |
235 | 237 |
), |
236 | 238 |
|
237 |
ULTI ( ObjectType.ULTI_2,
|
|
239 |
ULTI ( ObjectConstants.ULTI_2,
|
|
238 | 240 |
new String[][] { |
239 | 241 |
{"gb","n1ikPKZxGEo","Ultimate Skewb Tutorial","BeardedCubing"}, |
240 | 242 |
{"es","wNL1WJ_sCfs","Resolver Skewb ULTIMATE","Cuby"}, |
... | ... | |
246 | 248 |
} |
247 | 249 |
), |
248 | 250 |
|
249 |
DIAM2 ( ObjectType.DIAM_2,
|
|
251 |
DIAM2 ( ObjectConstants.DIAM_2,
|
|
250 | 252 |
new String[][] { |
251 | 253 |
{"gb","R2wrbJJ3izM","How to Solve a Skewb Diamond","Dr. Penguin^3"}, |
252 | 254 |
{"es","2RCusYQdYYE","Como resolver Skewb Diamond","Tutoriales Rubik"}, |
... | ... | |
258 | 260 |
} |
259 | 261 |
), |
260 | 262 |
|
261 |
DIAM3 ( ObjectType.DIAM_3,
|
|
263 |
DIAM3 ( ObjectConstants.DIAM_3,
|
|
262 | 264 |
new String[][] { |
263 | 265 |
{"gb","n_mBSUDLUZw","Face Turning Octahedron Tutorial","SuperAntoniovivaldi"}, |
264 | 266 |
{"es","ogf0t6fGxZI","FTO - Tutorial en español","Gadi Rubik"}, |
... | ... | |
268 | 270 |
} |
269 | 271 |
), |
270 | 272 |
|
271 |
DIAM4 ( ObjectType.DIAM_4,
|
|
273 |
DIAM4 ( ObjectConstants.DIAM_4,
|
|
272 | 274 |
new String[][] { |
273 | 275 |
{"gb","3GJkySk5zeQ","Master Face Turning Octahedron","SuperAntoniovivaldi"}, |
274 | 276 |
{"gb","zW_1htxy52k","Master FTO Tutorial","Michele Regano"}, |
... | ... | |
277 | 279 |
} |
278 | 280 |
), |
279 | 281 |
|
280 |
DINO3 ( ObjectType.DINO_3,
|
|
282 |
DINO3 ( ObjectConstants.DINO_3,
|
|
281 | 283 |
new String[][] { |
282 | 284 |
{"gb","puTJZqFBQwo","Dino Skewb Cube Tutorial","Bearded Cubing"}, |
283 | 285 |
{"es","6o1Yo5iCxvI","Resolver Cubo Dino","Cuby"}, |
... | ... | |
289 | 291 |
} |
290 | 292 |
), |
291 | 293 |
|
292 |
REDI3 ( ObjectType.REDI_3,
|
|
294 |
REDI3 ( ObjectConstants.REDI_3,
|
|
293 | 295 |
new String[][] { |
294 | 296 |
{"gb","Qn7TJED6O-4","How to Solve the MoYu Redi Cube","Z3"}, |
295 | 297 |
{"es","g0M38Aotgac","Resolver Redi Cube","Cuby"}, |
... | ... | |
301 | 303 |
} |
302 | 304 |
), |
303 | 305 |
|
304 |
HELI3 ( ObjectType.HELI_3,
|
|
306 |
HELI3 ( ObjectConstants.HELI_3,
|
|
305 | 307 |
new String[][] { |
306 | 308 |
{"gb","-suwJpd_PO8","Helicopter Cube Tutorial","Bearded Cubing"}, |
307 | 309 |
{"es","DWG9n_YyGPA","Resolver Helicopter Cube","Cuby"}, |
... | ... | |
313 | 315 |
} |
314 | 316 |
), |
315 | 317 |
|
316 |
SKEW2 ( ObjectType.SKEW_2,
|
|
318 |
SKEW2 ( ObjectConstants.SKEW_2,
|
|
317 | 319 |
new String[][] { |
318 | 320 |
{"gb","I6132yshkeU","How to Solve the Skewb","Z3"}, |
319 | 321 |
{"es","wxQX3HhPgds","Resolver Skewb (Principiantes)","Cuby"}, |
... | ... | |
326 | 328 |
} |
327 | 329 |
), |
328 | 330 |
|
329 |
SKEW3 ( ObjectType.SKEW_3,
|
|
331 |
SKEW3 ( ObjectConstants.SKEW_3,
|
|
330 | 332 |
new String[][] { |
331 | 333 |
{"gb","Jiuf7zQyPYI","Master Skewb Cube Tutorial","Bearded Cubing"}, |
332 | 334 |
{"es","8TP6p63KQCA","Master Skewb en Español","jorlozCubes"}, |
... | ... | |
341 | 343 |
} |
342 | 344 |
), |
343 | 345 |
|
344 |
IVY2 ( ObjectType.IVY_2,
|
|
346 |
IVY2 ( ObjectConstants.IVY_2,
|
|
345 | 347 |
new String[][] { |
346 | 348 |
{"gb","QMzeJobSu1M","How to Solve the Ivy Cube","Z3"}, |
347 | 349 |
{"es","2-Gf2cmEJDs","Resolver Ivy Cube","Cuby"}, |
... | ... | |
353 | 355 |
} |
354 | 356 |
), |
355 | 357 |
|
356 |
REX3 ( ObjectType.REX_3,
|
|
358 |
REX3 ( ObjectConstants.REX_3,
|
|
357 | 359 |
new String[][] { |
358 | 360 |
{"gb","noAQfWqlMbk","Rex Cube Tutorial","CrazyBadCuber"}, |
359 | 361 |
{"es","Q90x9rjLJzw","Resolver Cubo Rex","Cuby"}, |
... | ... | |
365 | 367 |
} |
366 | 368 |
), |
367 | 369 |
|
368 |
BAN1( ObjectType.BAN1_3,
|
|
370 |
BAN1( ObjectConstants.BAN1_3,
|
|
369 | 371 |
new String[][] { |
370 | 372 |
{"gb","F_iJk_IvpVo","Bandaged Cube","CanChrisSolve"}, |
371 | 373 |
{"es","_lTgw5aEFOg","Tutorial 3x3 Fuse Cube","QBAndo"}, |
... | ... | |
376 | 378 |
} |
377 | 379 |
), |
378 | 380 |
|
379 |
BAN2( ObjectType.BAN2_3,
|
|
381 |
BAN2( ObjectConstants.BAN2_3,
|
|
380 | 382 |
new String[][] { |
381 | 383 |
{"ru","lS_EK0PMWI8","Как собрать 2-bar Cube","Алексей Ярыгин"}, |
382 | 384 |
{"pl","tX8ubTLh6p8","Bandaged 3x3 (Two bar)","MrUK"}, |
... | ... | |
384 | 386 |
} |
385 | 387 |
), |
386 | 388 |
|
387 |
BAN3( ObjectType.BAN3_3,
|
|
389 |
BAN3( ObjectConstants.BAN3_3,
|
|
388 | 390 |
new String[][] { |
389 | 391 |
{"gb","7UiCVGygUT4","Bandage Cube C Tutorial","PolyakB"}, |
390 | 392 |
{"ru","gXenRA92Wdc","Как собрать Bandaged 3x3 Type C","YG Cuber"}, |
... | ... | |
393 | 395 |
} |
394 | 396 |
), |
395 | 397 |
|
396 |
BAN4( ObjectType.BAN4_3,
|
|
398 |
BAN4( ObjectConstants.BAN4_3,
|
|
397 | 399 |
new String[][] { |
398 | 400 |
{"gb","AnpdIKICBpM","Trying to Solve a Bandaged Cube","RedKB"}, |
399 | 401 |
{"es","cUyo5fycrvI","Tutorial Bandaged Cube en español","Rafa Garcia Benacazon"}, |
... | ... | |
405 | 407 |
} |
406 | 408 |
), |
407 | 409 |
|
408 |
SQUA1 ( ObjectType.SQU1_3,
|
|
410 |
SQUA1 ( ObjectConstants.SQU1_3,
|
|
409 | 411 |
new String[][] { |
410 | 412 |
{"gb","0tX-f6RLgac","How to Solve the Square-1","Z3"}, |
411 | 413 |
{"es","mGtHDWj_i1o","Resolver SQUARE-1","Cuby"}, |
... | ... | |
420 | 422 |
} |
421 | 423 |
), |
422 | 424 |
|
423 |
SQUA2 ( ObjectType.SQU2_3,
|
|
425 |
SQUA2 ( ObjectConstants.SQU2_3,
|
|
424 | 426 |
new String[][] { |
425 | 427 |
{"gb","PPXojiFthEs","Square-2 Tutorial","SuperAntoniovivaldi"}, |
426 | 428 |
{"es","IiMwc51xKBQ","Cómo resolver Square-2","skieur cubb"}, |
... | ... | |
431 | 433 |
} |
432 | 434 |
), |
433 | 435 |
|
434 |
CU_323 ( ObjectType.CU_323,
|
|
436 |
CU_323 ( ObjectConstants.CU_323,
|
|
435 | 437 |
new String[][] { |
436 | 438 |
{"gb","pbv652cE1AU","How To Solve the 3x3x2 ","JRCuber"}, |
437 | 439 |
{"es","RtDbnDxXPrs","Cuboid 3x3x2 Tutorial","Cubo da Loucura"}, |
... | ... | |
443 | 445 |
} |
444 | 446 |
), |
445 | 447 |
|
446 |
CU_232 ( ObjectType.CU_232,
|
|
448 |
CU_232 ( ObjectConstants.CU_232,
|
|
447 | 449 |
new String[][] { |
448 | 450 |
{"gb","6dYOrUgFCsc","How to Solve the 2x2x3","Z3"}, |
449 | 451 |
{"es","5-ePFYnnY9k","Cuboid 2x2x3 Tutorial","Cubo da Loucura"}, |
... | ... | |
455 | 457 |
} |
456 | 458 |
), |
457 | 459 |
|
458 |
CU_343 ( ObjectType.CU_343,
|
|
460 |
CU_343 ( ObjectConstants.CU_343,
|
|
459 | 461 |
new String[][] { |
460 | 462 |
{"gb","nh8DqpMM3Ro","How to solve the 3x3x4","BeardedCubing"}, |
461 | 463 |
{"es","nfeJ1q_OoHU","Cuboid 3x3x4 Tutorial","Cubo da Loucura"}, |
... | ... | |
469 | 471 |
|
470 | 472 |
|
471 | 473 |
public static final int NUM_OBJECTS = values().length; |
472 |
private final ObjectType mObject;
|
|
474 |
private final int mObject;
|
|
473 | 475 |
private final String[][] mTutorials; |
474 | 476 |
private final int mNumTutorials; |
475 | 477 |
|
... | ... | |
488 | 490 |
|
489 | 491 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
490 | 492 |
|
491 |
TutorialList(ObjectType object, String[][] tutorials)
|
|
493 |
TutorialList(int object, String[][] tutorials)
|
|
492 | 494 |
{ |
493 | 495 |
mObject = object; |
494 | 496 |
mTutorials = tutorials; |
... | ... | |
504 | 506 |
|
505 | 507 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
506 | 508 |
|
507 |
public static int getOrdinal(ObjectType object)
|
|
509 |
public static int getOrdinal(int object)
|
|
508 | 510 |
{ |
509 |
if( object== ObjectType.DIN4_3 )
|
|
511 |
if( object==ObjectConstants.DIN4_3 )
|
|
510 | 512 |
{ |
511 |
object= ObjectType.DINO_3;
|
|
513 |
object= ObjectConstants.DINO_3;
|
|
512 | 514 |
} |
513 | 515 |
|
514 | 516 |
for(int i=0; i<NUM_OBJECTS; i++) |
... | ... | |
524 | 526 |
|
525 | 527 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
526 | 528 |
|
527 |
public ObjectType getObject()
|
|
529 |
public int getObject()
|
|
528 | 530 |
{ |
529 | 531 |
return mObject; |
530 | 532 |
} |
... | ... | |
540 | 542 |
|
541 | 543 |
public int getIconID() |
542 | 544 |
{ |
545 |
RubikObject object = RubikObjectList.getObject(mObject); |
|
543 | 546 |
int iconSize = RubikActivity.getDrawableSize(); |
544 |
return mObject.getIconID(iconSize);
|
|
547 |
return object==null ? 0 : object.getIconID(iconSize);
|
|
545 | 548 |
} |
546 | 549 |
|
547 | 550 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
In the 'magic' app, ObjectType is now only used in RubikObject and RubikObjectList classes and nowhere else.
This is a major step towards being able to download objects from an online repository.