Revision 044529c1
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/patterns/RubikPattern.java | ||
---|---|---|
29 | 29 |
public static final int MAX_CUBE = 5; |
30 | 30 |
public static final int NUM_CUBES = MAX_CUBE-MIN_CUBE+1; |
31 | 31 |
|
32 |
private int[] numCategories = new int[NUM_CUBES]; |
|
32 |
private int[] numCategories = new int[NUM_CUBES]; |
|
33 |
private int[] currentCategory = new int[NUM_CUBES]; |
|
33 | 34 |
private Vector<Category>[] mCategories; |
34 | 35 |
private static RubikPattern mThis; |
35 | 36 |
|
... | ... | |
310 | 311 |
return null; |
311 | 312 |
} |
312 | 313 |
|
314 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
315 |
|
|
316 |
public void rememberCategory(int size,int num) |
|
317 |
{ |
|
318 |
if( size>=0 && size<NUM_CUBES ) |
|
319 |
{ |
|
320 |
currentCategory[size] = num; |
|
321 |
} |
|
322 |
} |
|
323 |
|
|
324 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
325 |
|
|
326 |
public int recallCategory(int size) |
|
327 |
{ |
|
328 |
return size>=0 && size<NUM_CUBES ? currentCategory[size] : 0; |
|
329 |
} |
|
330 |
|
|
313 | 331 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
314 | 332 |
|
315 | 333 |
public String getPatternName(int size, int cat, int pat) |
Also available in: Unified diff
Remember state of the dialog.