Project

General

Profile

« Previous | Next » 

Revision 7ac0ee88

Added by Leszek Koltunski over 2 years ago

Simplify ObjectList: now there's just one object per size.

View differences:

src/main/java/org/distorted/solvers/ImplementedSolversList.java
25 25

  
26 26
public enum ImplementedSolversList
27 27
{
28
  CUBE3 ( ObjectList.CUBE, 3),
28
  CUBE3 ( ObjectList.CUBE_3),
29 29
  ;
30 30

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

  
33 33
  private final ObjectList mObject;
34
  private final int mObjectSize;
35 34

  
36 35
  private static final ImplementedSolversList[] objects;
37 36

  
......
55 54

  
56 55
///////////////////////////////////////////////////////////////////////////////////////////////////
57 56

  
58
  public static int getObjectSize(int ordinal)
57
  ImplementedSolversList(ObjectList object)
59 58
    {
60
    return objects[ordinal].mObjectSize;
61
    }
62

  
63
///////////////////////////////////////////////////////////////////////////////////////////////////
64

  
65
  ImplementedSolversList(ObjectList object, int size)
66
    {
67
    mObject     = object;
68
    mObjectSize =  size;
59
    mObject= object;
69 60
    }
70 61
}

Also available in: Unified diff