Project

General

Profile

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

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

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
  CUBE2          (ObjectSignatures.CUBE_2, R.string.solver_cube2_title, R.string.solver_cube2_description, true),
20
  CUBE3_KOCIEMBA (ObjectSignatures.CUBE_3, R.string.solver_cube3_title, R.string.solver_cube3_description, true),
21
  PYRAMINX       (ObjectSignatures.PYRA_3, R.string.solver_pyra3_title, R.string.solver_pyra3_description, true),
22
  PYRAMINX_DUO   (ObjectSignatures.PDUO_2, R.string.solver_pduo2_title, R.string.solver_pduo2_description, true),
23
  IVY            (ObjectSignatures.IVY_2 , R.string.solver_ivy_title, R.string.solver_ivy_description, true),
24
  TOWER          (ObjectSignatures.CU_232, R.string.solver_cu232_title, R.string.solver_cu232_description, true),
25
  DIAMOND        (ObjectSignatures.DIAM_2, R.string.solver_diam2_title, R.string.solver_diam2_description, true),
26
  SKEWB          (ObjectSignatures.SKEW_2, R.string.solver_skew2_title, R.string.solver_skew2_description, false),
27
  JING2          (ObjectSignatures.JING_2, R.string.solver_jing2_title, R.string.solver_jing2_description, false),
28
  ;
29

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

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

    
37
  private static final ImplementedSolversList[] objects;
38

    
39
  static
40
    {
41
    objects = new ImplementedSolversList[NUM_OBJECTS];
42
    int i=0;
43

    
44
    for(ImplementedSolversList object: ImplementedSolversList.values())
45
      {
46
      objects[i++] = object;
47
      }
48
    }
49

    
50
///////////////////////////////////////////////////////////////////////////////////////////////////
51

    
52
  public static ImplementedSolversList getSolver(int ordinal)
53
    {
54
    return objects[ordinal];
55
    }
56

    
57
///////////////////////////////////////////////////////////////////////////////////////////////////
58

    
59
  ImplementedSolversList(int object, int title, int descripton, boolean implemented)
60
    {
61
    mObject      = object;
62
    mTitle       = title;
63
    mDescription = descripton;
64
    mImplemented = implemented;
65
    }
66

    
67
///////////////////////////////////////////////////////////////////////////////////////////////////
68

    
69
  public int getObject()
70
    {
71
    return mObject;
72
    }
73

    
74
///////////////////////////////////////////////////////////////////////////////////////////////////
75

    
76
  public int getTitle()
77
    {
78
    return mTitle;
79
    }
80

    
81
///////////////////////////////////////////////////////////////////////////////////////////////////
82

    
83
  public int getDescription()
84
    {
85
    return mDescription;
86
    }
87

    
88
///////////////////////////////////////////////////////////////////////////////////////////////////
89

    
90
  public boolean isImplemented()
91
    {
92
    return mImplemented;
93
    }
94
}
(1-1/10)