Project

General

Profile

Download (3.85 KB) Statistics
| Branch: | Tag: | Revision:

magiccube / src / main / java / org / distorted / solvers / ImplementedSolversList.java @ fc34fd0c

1 373fa45f Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2020 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Magic Cube.                                                              //
5
//                                                                                               //
6 bb62ca3f Leszek Koltunski
// 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 373fa45f Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
9
10
package org.distorted.solvers;
11
12 93a1c364 Leszek Koltunski
import org.distorted.main.R;
13 e4733ed7 Leszek Koltunski
import org.distorted.objectlib.main.ObjectSignatures;
14 373fa45f Leszek Koltunski
15
///////////////////////////////////////////////////////////////////////////////////////////////////
16
17
public enum ImplementedSolversList
18
{
19 bb10ab21 Leszek Koltunski
  CUBE2          (ObjectSignatures.CUBE_2, R.string.solver_cube2_title, R.string.solver_cube2_description, true),
20 93a1c364 Leszek Koltunski
  CUBE3_KOCIEMBA (ObjectSignatures.CUBE_3, R.string.solver_cube3_title, R.string.solver_cube3_description, true),
21 baddedaf Leszek Koltunski
  PYRAMINX       (ObjectSignatures.PYRA_3, R.string.solver_pyra3_title, R.string.solver_pyra3_description, true),
22 fc34fd0c Leszek Koltunski
  SKEWB          (ObjectSignatures.SKEW_2, R.string.solver_skew2_title, R.string.solver_skew2_description, true),
23 a7cfc9a9 Leszek Koltunski
  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
  TOWER          (ObjectSignatures.CU_232, R.string.solver_cu232_title, R.string.solver_cu232_description, true),
26
  DIAMOND        (ObjectSignatures.DIAM_2, R.string.solver_diam2_title, R.string.solver_diam2_description, true),
27 18354673 Leszek Koltunski
  JING2          (ObjectSignatures.JING_2, R.string.solver_jing2_title, R.string.solver_jing2_description, true),
28 fc34fd0c Leszek Koltunski
  DINO6          (ObjectSignatures.DINO_3, R.string.solver_dino6_title, R.string.solver_dino6_description, false),
29
  PDIA           (ObjectSignatures.PDIA_3, R.string.solver_pdia_title, R.string.solver_pdia_description, false),
30 373fa45f Leszek Koltunski
  ;
31
32
  public static final int NUM_OBJECTS = values().length;
33
34 d433b50e Leszek Koltunski
  private final int mObject;
35 93a1c364 Leszek Koltunski
  private final int mTitle;
36
  private final int mDescription;
37
  private final boolean mImplemented;
38 373fa45f Leszek Koltunski
39
  private static final ImplementedSolversList[] objects;
40
41
  static
42
    {
43
    objects = new ImplementedSolversList[NUM_OBJECTS];
44
    int i=0;
45
46
    for(ImplementedSolversList object: ImplementedSolversList.values())
47
      {
48
      objects[i++] = object;
49
      }
50
    }
51
52
///////////////////////////////////////////////////////////////////////////////////////////////////
53
54 93a1c364 Leszek Koltunski
  public static ImplementedSolversList getSolver(int ordinal)
55 373fa45f Leszek Koltunski
    {
56 93a1c364 Leszek Koltunski
    return objects[ordinal];
57 373fa45f Leszek Koltunski
    }
58
59
///////////////////////////////////////////////////////////////////////////////////////////////////
60
61 93a1c364 Leszek Koltunski
  ImplementedSolversList(int object, int title, int descripton, boolean implemented)
62 373fa45f Leszek Koltunski
    {
63 93a1c364 Leszek Koltunski
    mObject      = object;
64
    mTitle       = title;
65
    mDescription = descripton;
66
    mImplemented = implemented;
67
    }
68
69
///////////////////////////////////////////////////////////////////////////////////////////////////
70
71
  public int getObject()
72
    {
73
    return mObject;
74
    }
75
76
///////////////////////////////////////////////////////////////////////////////////////////////////
77
78
  public int getTitle()
79
    {
80
    return mTitle;
81
    }
82
83
///////////////////////////////////////////////////////////////////////////////////////////////////
84
85
  public int getDescription()
86
    {
87
    return mDescription;
88
    }
89
90
///////////////////////////////////////////////////////////////////////////////////////////////////
91
92
  public boolean isImplemented()
93
    {
94
    return mImplemented;
95 373fa45f Leszek Koltunski
    }
96
}