Project

General

Profile

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

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

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
  CUBE3_KOCIEMBA (ObjectSignatures.CUBE_3, R.string.solver_cube3_title, R.string.solver_cube3_description, true),
20
  PYRAMINX_DUO   (ObjectSignatures.PDUO_2, R.string.solver_pduo2_title, R.string.solver_pduo2_description, true),
21
  IVY            (ObjectSignatures.IVY_2 , R.string.solver_ivy_title, R.string.solver_ivy_description, true),
22
  TOWER          (ObjectSignatures.CU_232, R.string.solver_cu232_title, R.string.solver_cu232_description, true),
23
  PYRAMINX       (ObjectSignatures.PYRA_3, R.string.solver_pyra3_title, R.string.solver_pyra3_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
  ;
28

    
29
  public static final int NUM_OBJECTS = values().length;
30

    
31
  private final int mObject;
32
  private final int mTitle;
33
  private final int mDescription;
34
  private final boolean mImplemented;
35

    
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
  public static ImplementedSolversList getSolver(int ordinal)
52
    {
53
    return objects[ordinal];
54
    }
55

    
56
///////////////////////////////////////////////////////////////////////////////////////////////////
57

    
58
  ImplementedSolversList(int object, int title, int descripton, boolean implemented)
59
    {
60
    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
    }
93
}
(1-1/9)