Project

General

Profile

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

magiccube / src / main / java / org / distorted / solvers / ImplementedSolversList.java @ 7ed91391

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.objectlib.main.ObjectSignatures;
13

    
14
///////////////////////////////////////////////////////////////////////////////////////////////////
15

    
16
public enum ImplementedSolversList
17
{
18
  CUBE3 (ObjectSignatures.CUBE_3),
19
  ;
20

    
21
  public static final int NUM_OBJECTS = values().length;
22

    
23
  private final int mObject;
24

    
25
  private static final ImplementedSolversList[] objects;
26

    
27
  static
28
    {
29
    objects = new ImplementedSolversList[NUM_OBJECTS];
30
    int i=0;
31

    
32
    for(ImplementedSolversList object: ImplementedSolversList.values())
33
      {
34
      objects[i++] = object;
35
      }
36
    }
37

    
38
///////////////////////////////////////////////////////////////////////////////////////////////////
39

    
40
  public static int getObject(int ordinal)
41
    {
42
    return objects[ordinal].mObject;
43
    }
44

    
45
///////////////////////////////////////////////////////////////////////////////////////////////////
46

    
47
  ImplementedSolversList(int object)
48
    {
49
    mObject= object;
50
    }
51
}
(1-1/2)