Project

General

Profile

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

magiccube / src / main / java / org / distorted / solvers / ImplementedSolversList.java @ 617b7b66

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