Project

General

Profile

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

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

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