Project

General

Profile

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

magiccube / src / main / java / org / distorted / solvers / ImplementedSolversList.java @ 420eb96d

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       (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
  TOWER          (ObjectSignatures.CU_232, R.string.solver_cu232_title, R.string.solver_cu232_description, false),
23
  DIAMOND        (ObjectSignatures.DIAM_2, R.string.solver_diam2_title, R.string.solver_diam2_description, false),
24
  ;
25

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

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

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

    
53
///////////////////////////////////////////////////////////////////////////////////////////////////
54

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