Project

General

Profile

« Previous | Next » 

Revision 5f54927b

Added by Leszek Koltunski over 2 years ago

Preparation for local creation of puzzles: remove the 'ObjectType' enum from TwistyObject class.

View differences:

src/main/java/org/distorted/objectlib/objects/TwistyPyraminx.java
365 365

  
366 366
///////////////////////////////////////////////////////////////////////////////////////////////////
367 367

  
368
  public ObjectType intGetObjectType(int[] numLayers)
368
  public String getShortName()
369 369
    {
370
    switch(numLayers[0])
370
    switch(getNumLayers()[0])
371
      {
372
      case 3: return ObjectType.PYRA_3.name();
373
      case 4: return ObjectType.PYRA_4.name();
374
      case 5: return ObjectType.PYRA_5.name();
375
      }
376

  
377
    return ObjectType.PYRA_3.name();
378
    }
379

  
380
///////////////////////////////////////////////////////////////////////////////////////////////////
381

  
382
  public long getSignature()
383
    {
384
    switch(getNumLayers()[0])
371 385
      {
372
      case 3: return ObjectType.PYRA_3;
373
      case 4: return ObjectType.PYRA_4;
374
      case 5: return ObjectType.PYRA_5;
386
      case 3: return ObjectType.PYRA_3.ordinal();
387
      case 4: return ObjectType.PYRA_4.ordinal();
388
      case 5: return ObjectType.PYRA_5.ordinal();
375 389
      }
376 390

  
377
    return ObjectType.PYRA_3;
391
    return ObjectType.PYRA_3.ordinal();
378 392
    }
379 393

  
380 394
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff