Project

General

Profile

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

magiccube / src / main / java / org / distorted / solvers / ImplementedSolversList.java @ 16003ca8

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, false),
21
  IVY            (ObjectSignatures.IVY_2 , R.string.solver_ivy_title, R.string.solver_ivy_description, false),
22
  TOWER          (ObjectSignatures.CU_232, R.string.solver_cu232_title, R.string.solver_cu232_description, false),
23
  PYRAMINX       (ObjectSignatures.PYRA_3, R.string.solver_pyra3_title, R.string.solver_pyra3_description, false),
24
  DIAMOND        (ObjectSignatures.DIAM_2, R.string.solver_diam2_title, R.string.solver_diam2_description, false),
25
  ;
26

    
27
  public static final int NUM_OBJECTS = values().length;
28

    
29
  private final int mObject;
30
  private final int mTitle;
31
  private final int mDescription;
32
  private final boolean mImplemented;
33

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

    
54
///////////////////////////////////////////////////////////////////////////////////////////////////
55

    
56
  ImplementedSolversList(int object, int title, int descripton, boolean implemented)
57
    {
58
    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
    }
91
}
(1-1/7)