Project

General

Profile

« Previous | Next » 

Revision 8e3898c8

Added by Leszek Koltunski about 4 years ago

Each object size now has its own number of levels (not always 18!)

View differences:

src/main/java/org/distorted/scores/RubikScoresDownloader.java
29 29
import java.net.URL;
30 30
import java.net.UnknownHostException;
31 31

  
32
import static org.distorted.states.RubikStatePlay.MAX_LEVEL;
32
import static org.distorted.objects.RubikObjectList.MAX_LEVEL;
33 33

  
34 34
///////////////////////////////////////////////////////////////////////////////////////////////////
35 35

  
......
185 185

  
186 186
      if( object>=0 && object<mTotal )
187 187
        {
188
        int scramble   = Integer.parseInt( row.substring(s1+1,s2) );
188
        int level      = Integer.parseInt( row.substring(s1+1,s2) );
189 189
        String name    = row.substring(s2+1, s3);
190 190
        int time       = Integer.parseInt( row.substring(s3+1,s4) );
191 191
        String country = row.substring(s4+1, s5);
192 192

  
193
        if(scramble>=0 && scramble<MAX_LEVEL)
193
        if(level>=0 && level<MAX_LEVEL)
194 194
          {
195
          int p = mPlaces[object][scramble];
196
          mPlaces[object][scramble]++;
195
          int p = mPlaces[object][level];
196
          mPlaces[object][level]++;
197 197

  
198
          mCountry[object][scramble][p] = country;
199
          mName   [object][scramble][p] = name;
200
          mTime   [object][scramble][p] = ((float)(time/100))/10.0f;
198
          mCountry[object][level][p] = country;
199
          mName   [object][level][p] = name;
200
          mTime   [object][level][p] = ((float)(time/100))/10.0f;
201 201
          }
202 202
        }
203 203
      }

Also available in: Unified diff