Revision 97201782
Added by Leszek Koltunski 6 months ago
src/main/java/org/distorted/external/RubikScores.java | ||
---|---|---|
35 | 35 |
public static final int RECORD_NOT_NEW = 2; |
36 | 36 |
|
37 | 37 |
public static final int MAX_RECORD = 10; |
38 |
public static final int MULT = 1000000;
|
|
38 |
private static final int MULT = 1000000;
|
|
39 | 39 |
public static final int NO_RECORD = Integer.MAX_VALUE; |
40 | 40 |
private static RubikScores mThis; |
41 | 41 |
|
... | ... | |
83 | 83 |
|
84 | 84 |
private int mapKey(int object,int level) |
85 | 85 |
{ |
86 |
return object*MULT + level;
|
|
86 |
return object*MULT + (level<0 ? MULT-1 : level);
|
|
87 | 87 |
} |
88 | 88 |
|
89 | 89 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
151 | 151 |
for(int key: mMap.keySet()) |
152 | 152 |
{ |
153 | 153 |
MapValue value = mMap.get(key); |
154 |
int level = key%MULT; |
|
154 | 155 |
|
155 |
if( value!=null && !value.submitted && value.record<NO_RECORD) |
|
156 |
if( level<MULT-1 && value!=null && !value.submitted && value.record<NO_RECORD)
|
|
156 | 157 |
{ |
157 | 158 |
if( !first ) |
158 | 159 |
{ |
... | ... | |
167 | 168 |
if( object!=null ) |
168 | 169 |
{ |
169 | 170 |
builderObj.append(object.getUpperName()); |
170 |
builderLvl.append(key%MULT);
|
|
171 |
builderLvl.append(level);
|
|
171 | 172 |
builderTim.append(value.record); |
172 | 173 |
} |
173 | 174 |
} |
174 | 175 |
} |
175 | 176 |
|
176 |
return strObj+builderObj.toString()+strLvl+builderLvl.toString()+strTim+builderTim.toString();
|
|
177 |
return strObj+builderObj+strLvl+builderLvl+strTim+builderTim;
|
|
177 | 178 |
} |
178 | 179 |
|
179 | 180 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
bugfixes