Project

General

Profile

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

magiccube / src / main / java / org / distorted / solvers / ImplementedSolversList.java @ 62c08ea7

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 93a1c364 Leszek Koltunski
  CUBE3_KOCIEMBA (ObjectSignatures.CUBE_3, R.string.solver_cube3_title, R.string.solver_cube3_description, true),
20 7bdd481b Leszek Koltunski
  PYRAMINX_DUO   (ObjectSignatures.PDUO_2, R.string.solver_pduo2_title, R.string.solver_pduo2_description, false),
21 93a1c364 Leszek Koltunski
  IVY            (ObjectSignatures.IVY_2 , R.string.solver_ivy_title, R.string.solver_ivy_description, false),
22 67d7fb28 Leszek Koltunski
  TOWER          (ObjectSignatures.CU_232, R.string.solver_cu232_title, R.string.solver_cu232_description, false),
23 16003ca8 Leszek Koltunski
  PYRAMINX       (ObjectSignatures.PYRA_3, R.string.solver_pyra3_title, R.string.solver_pyra3_description, false),
24 f29a423a Leszek Koltunski
  DIAMOND        (ObjectSignatures.DIAM_2, R.string.solver_diam2_title, R.string.solver_diam2_description, false),
25 373fa45f Leszek Koltunski
  ;
26
27
  public static final int NUM_OBJECTS = values().length;
28
29 d433b50e Leszek Koltunski
  private final int mObject;
30 93a1c364 Leszek Koltunski
  private final int mTitle;
31
  private final int mDescription;
32
  private final boolean mImplemented;
33 373fa45f Leszek Koltunski
34
  private static final ImplementedSolversList[] objects;
35
36
  static
37
    {
38
    objects = new ImplementedSolversList[NUM_OBJECTS];
39
    int i=0;
40
41
    for(ImplementedSolversList object: ImplementedSolversList.values())
42
      {
43
      objects[i++] = object;
44
      }
45
    }
46
47
///////////////////////////////////////////////////////////////////////////////////////////////////
48
49 93a1c364 Leszek Koltunski
  public static ImplementedSolversList getSolver(int ordinal)
50 373fa45f Leszek Koltunski
    {
51 93a1c364 Leszek Koltunski
    return objects[ordinal];
52 373fa45f Leszek Koltunski
    }
53
54
///////////////////////////////////////////////////////////////////////////////////////////////////
55
56 93a1c364 Leszek Koltunski
  ImplementedSolversList(int object, int title, int descripton, boolean implemented)
57 373fa45f Leszek Koltunski
    {
58 93a1c364 Leszek Koltunski
    mObject      = object;
59
    mTitle       = title;
60
    mDescription = descripton;
61
    mImplemented = implemented;
62
    }
63
64
///////////////////////////////////////////////////////////////////////////////////////////////////
65
66
  public int getObject()
67
    {
68
    return mObject;
69
    }
70
71
///////////////////////////////////////////////////////////////////////////////////////////////////
72
73
  public int getTitle()
74
    {
75
    return mTitle;
76
    }
77
78
///////////////////////////////////////////////////////////////////////////////////////////////////
79
80
  public int getDescription()
81
    {
82
    return mDescription;
83
    }
84
85
///////////////////////////////////////////////////////////////////////////////////////////////////
86
87
  public boolean isImplemented()
88
    {
89
    return mImplemented;
90 373fa45f Leszek Koltunski
    }
91
}