Project

General

Profile

« Previous | Next » 

Revision 49f67f9b

Added by Leszek Koltunski about 4 years ago

Progress with Pyraminx.

View differences:

src/main/java/org/distorted/object/RubikCube.java
89 89
    int numCubits = size>1 ? 6*size*size - 12*size + 8 : 1;
90 90
    Static3D[] tmp = new Static3D[numCubits];
91 91

  
92
    float diff = 0.5f*(size-1);
92 93
    int currentPosition = 0;
93 94

  
94 95
    for(int x = 0; x<size; x++)
......
96 97
        for(int z = 0; z<size; z++)
97 98
          if( x==0 || x==size-1 || y==0 || y==size-1 || z==0 || z==size-1 )
98 99
            {
99
            tmp[currentPosition++] = new Static3D(x,y,z);
100
            tmp[currentPosition++] = new Static3D(x-diff,y-diff,z-diff);
100 101
            }
101 102

  
102 103
    return tmp;

Also available in: Unified diff