Project

General

Profile

« Previous | Next » 

Revision 6377eed5

Added by Leszek Koltunski 8 months ago

Introduce Creator of Bandaged Skewbs.

View differences:

src/main/java/org/distorted/objectlib/bandaged/BandagedObjectMegaminx.java
268 268

  
269 269
///////////////////////////////////////////////////////////////////////////////////////////////////
270 270

  
271
  boolean isAdjacent(float dx, float dy, float dz)
271
  boolean isAdjacent(float x1, float y1, float z1, float x2, float y2, float z2 )
272 272
    {
273
    float dx = x1-x2;
274
    float dy = y1-y2;
275
    float dz = z1-z2;
276

  
273 277
    return isAdjacent(mSize[0],dx,dy,dz);
274 278
    }
275 279

  
......
284 288
///////////////////////////////////////////////////////////////////////////////////////////////////
285 289
// PUBLIC API
286 290

  
287
  public BandagedObjectMegaminx(DistortedScreen screen)
291
  public BandagedObjectMegaminx(DistortedScreen screen, int minSize, int maxSize)
288 292
    {
289
    super(screen);
293
    super(screen,minSize,maxSize);
290 294
    }
291 295

  
292 296
///////////////////////////////////////////////////////////////////////////////////////////////////
......
315 319

  
316 320
  public boolean tryChangeObject(int x, int y, int z)
317 321
    {
318
    if( mSize[0]!=x )
322
    if( mSize[0]!=x && x>=mMinSize && x<=mMaxSize )
319 323
      {
320 324
      mSize[0] = x;
321 325
      mSize[1] = x;
......
329 333
      mCuts = getCuts(mSize);
330 334
      return true;
331 335
      }
332

  
336
    else if( mCuts==null )
337
      {
338
      mMax = 2;
339
      mNumCubits = numCubits(mMax);
340
      mCuts = getCuts(mSize);
341
      }
333 342
    return false;
334 343
    }
335 344

  

Also available in: Unified diff