1
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
2
|
// Copyright 2020 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;
|
11
|
|
12
|
import static org.distorted.objectlib.solvers.verifiers.ImplementedVerifierList.*;
|
13
|
|
14
|
import org.distorted.main.R;
|
15
|
import org.distorted.objectlib.solvers.verifiers.*;
|
16
|
|
17
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
18
|
|
19
|
public enum SolverDescriptions
|
20
|
{
|
21
|
DESC_CUBE2 ( CUBE2 , R.string.solver_cube2_title, R.string.solver_cube2_description),
|
22
|
DESC_CU232 ( CU232 , R.string.solver_cu232_title, R.string.solver_cu232_description),
|
23
|
DESC_CU323 ( CU323 , R.string.solver_cu323_title, R.string.solver_cu323_description),
|
24
|
DESC_PYRAMINX ( PYRAMINX , R.string.solver_pyra3_title, R.string.solver_pyra3_description),
|
25
|
DESC_SKEWB ( SKEWB , R.string.solver_skew2_title, R.string.solver_skew2_description),
|
26
|
DESC_PYRAMINX_DUO ( PYRAMINX_DUO , R.string.solver_pduo2_title, R.string.solver_pduo2_description),
|
27
|
DESC_IVY ( IVY , R.string.solver_ivy_title , R.string.solver_ivy_description ),
|
28
|
DESC_DIAMOND ( DIAMOND , R.string.solver_diam2_title, R.string.solver_diam2_description),
|
29
|
DESC_JING2 ( JING2 , R.string.solver_jing2_title, R.string.solver_jing2_description),
|
30
|
DESC_DINO6 ( DINO6 , R.string.solver_dino6_title, R.string.solver_dino6_description),
|
31
|
DESC_DINO4 ( DINO4 , R.string.solver_dino4_title, R.string.solver_dino4_description),
|
32
|
DESC_PDIA ( PDIA , R.string.solver_pdia_title , R.string.solver_pdia_description ),
|
33
|
|
34
|
DESC_CUBE3_KOCIEMBA ( CUBE3_KOCIEMBA, R.string.solver_cube3_title, R.string.solver_cube3_description),
|
35
|
|
36
|
DESC_CUBE3_ALGO ( CUBE3_ALGO , R.string.solver_3algo_title, R.string.solver_3algo_description),
|
37
|
DESC_KILO3_ALGO ( KILO3_ALGO , R.string.solver_kilo3_title, R.string.solver_kilo3_description),
|
38
|
;
|
39
|
|
40
|
public static final int NUM_OBJECTS = values().length;
|
41
|
|
42
|
private final ImplementedVerifierList mSolver;
|
43
|
private final int mTitle;
|
44
|
private final int mDescription;
|
45
|
|
46
|
private static final SolverDescriptions[] objects;
|
47
|
|
48
|
static
|
49
|
{
|
50
|
objects = new SolverDescriptions[NUM_OBJECTS];
|
51
|
int i=0;
|
52
|
|
53
|
for( SolverDescriptions object: SolverDescriptions.values())
|
54
|
{
|
55
|
objects[i++] = object;
|
56
|
}
|
57
|
}
|
58
|
|
59
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
60
|
|
61
|
SolverDescriptions(ImplementedVerifierList solver, int title, int descripton)
|
62
|
{
|
63
|
mSolver = solver;
|
64
|
mTitle = title;
|
65
|
mDescription = descripton;
|
66
|
}
|
67
|
|
68
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
69
|
|
70
|
public static SolverDescriptions getDescription(int ordinal)
|
71
|
{
|
72
|
for(int i=0; i<NUM_OBJECTS; i++)
|
73
|
if( objects[i].mSolver.ordinal()==ordinal ) return objects[i];
|
74
|
|
75
|
return null;
|
76
|
}
|
77
|
|
78
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
79
|
|
80
|
public ImplementedVerifierList getSolver() { return mSolver; }
|
81
|
public int getTitle() { return mTitle; }
|
82
|
public int getDescription() { return mDescription; }
|
83
|
}
|