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 org.distorted.main.R;
|
13
|
import org.distorted.objectlib.main.ObjectSignatures;
|
14
|
|
15
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
16
|
|
17
|
public enum ImplementedSolversList
|
18
|
{
|
19
|
CUBE2 (ObjectSignatures.CUBE_2, R.string.solver_cube2_title, R.string.solver_cube2_description, true),
|
20
|
CUBE3_KOCIEMBA (ObjectSignatures.CUBE_3, R.string.solver_cube3_title, R.string.solver_cube3_description, true),
|
21
|
PYRAMINX (ObjectSignatures.PYRA_3, R.string.solver_pyra3_title, R.string.solver_pyra3_description, true),
|
22
|
SKEWB (ObjectSignatures.SKEW_2, R.string.solver_skew2_title, R.string.solver_skew2_description, true),
|
23
|
PYRAMINX_DUO (ObjectSignatures.PDUO_2, R.string.solver_pduo2_title, R.string.solver_pduo2_description, true),
|
24
|
IVY (ObjectSignatures.IVY_2 , R.string.solver_ivy_title, R.string.solver_ivy_description, true),
|
25
|
CU_232 (ObjectSignatures.CU_232, R.string.solver_cu232_title, R.string.solver_cu232_description, true),
|
26
|
CU_323 (ObjectSignatures.CU_323, R.string.solver_cu323_title, R.string.solver_cu323_description, true),
|
27
|
DIAMOND (ObjectSignatures.DIAM_2, R.string.solver_diam2_title, R.string.solver_diam2_description, true),
|
28
|
JING2 (ObjectSignatures.JING_2, R.string.solver_jing2_title, R.string.solver_jing2_description, true),
|
29
|
DINO6 (ObjectSignatures.DINO_3, R.string.solver_dino6_title, R.string.solver_dino6_description, true),
|
30
|
DINO4 (ObjectSignatures.DIN4_3, R.string.solver_dino4_title, R.string.solver_dino4_description, true),
|
31
|
PDIA (ObjectSignatures.PDIA_3, R.string.solver_pdia_title, R.string.solver_pdia_description, true),
|
32
|
;
|
33
|
|
34
|
public static final int NUM_OBJECTS = values().length;
|
35
|
|
36
|
private final int mObject;
|
37
|
private final int mTitle;
|
38
|
private final int mDescription;
|
39
|
private final boolean mImplemented;
|
40
|
|
41
|
private static final ImplementedSolversList[] objects;
|
42
|
|
43
|
static
|
44
|
{
|
45
|
objects = new ImplementedSolversList[NUM_OBJECTS];
|
46
|
int i=0;
|
47
|
|
48
|
for(ImplementedSolversList object: ImplementedSolversList.values())
|
49
|
{
|
50
|
objects[i++] = object;
|
51
|
}
|
52
|
}
|
53
|
|
54
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
55
|
|
56
|
public static ImplementedSolversList getSolver(int ordinal)
|
57
|
{
|
58
|
return objects[ordinal];
|
59
|
}
|
60
|
|
61
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
62
|
|
63
|
ImplementedSolversList(int object, int title, int descripton, boolean implemented)
|
64
|
{
|
65
|
mObject = object;
|
66
|
mTitle = title;
|
67
|
mDescription = descripton;
|
68
|
mImplemented = implemented;
|
69
|
}
|
70
|
|
71
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
72
|
|
73
|
public int getObject()
|
74
|
{
|
75
|
return mObject;
|
76
|
}
|
77
|
|
78
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
79
|
|
80
|
public int getTitle()
|
81
|
{
|
82
|
return mTitle;
|
83
|
}
|
84
|
|
85
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
86
|
|
87
|
public int getDescription()
|
88
|
{
|
89
|
return mDescription;
|
90
|
}
|
91
|
|
92
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
93
|
|
94
|
public boolean isImplemented()
|
95
|
{
|
96
|
return mImplemented;
|
97
|
}
|
98
|
}
|