Project

General

Profile

« Previous | Next » 

Revision 8ab435b9

Added by Leszek Koltunski over 2 years ago

1. Remove 'db level' from objectlib (this belongs to the app!)
2. change ScreenPlay's 'mObject' to be an ObjectType.

View differences:

src/main/java/org/distorted/network/RubikNetwork.java
36 36
import org.distorted.library.main.DistortedLibrary;
37 37
import org.distorted.objectlib.main.ObjectType;
38 38

  
39
import static org.distorted.objectlib.main.ObjectType.MAX_LEVEL;
39
import static org.distorted.screens.RubikScreenPlay.MAX_LEVEL;
40 40
import static org.distorted.objectlib.main.ObjectType.NUM_OBJECTS;
41 41

  
42 42
///////////////////////////////////////////////////////////////////////////////////////////////////
......
458 458
    return url;
459 459
    }
460 460

  
461
///////////////////////////////////////////////////////////////////////////////////////////////////
462

  
463
  private static String getObjectList()
464
    {
465
    StringBuilder list = new StringBuilder();
466
    ObjectType[] objects = ObjectType.values();
467

  
468
    for(int i=0; i<NUM_OBJECTS; i++)
469
      {
470
      if( i>0 ) list.append(',');
471
      list.append(objects[i].name());
472
      }
473

  
474
    return list.toString();
475
    }
476

  
461 477
///////////////////////////////////////////////////////////////////////////////////////////////////
462 478

  
463 479
  private String constructDownloadURL()
......
471 487

  
472 488
    String url="https://distorted.org/magic/cgi-bin/download.cgi";
473 489
    url += "?n="+name+"&v="+veri+"&r="+numRuns+"&p="+numPlay+"&c="+country+"&e="+mVersion+"d";
474
    url += "&o="+ ObjectType.getObjectList()+"&min=0&max="+MAX_LEVEL+"&l="+MAX_PLACES;
490
    url += "&o="+getObjectList()+"&min=0&max="+MAX_LEVEL+"&l="+MAX_PLACES;
475 491

  
476 492
    return url;
477 493
    }
......
501 517
    String url1="https://distorted.org/magic/cgi-bin/submit.cgi";
502 518
    String url2 = "n="+name+"&v="+veri+"&r="+numRuns+"&p="+numPlay+"&i="+deviceID+"&e="+mVersion+"d";
503 519
    url2 += "&d="+renderer+"&s="+version;
504
    url2 += reclist+"&c="+country+"&f="+epoch+"&oo="+ ObjectType.getObjectList();
520
    url2 += reclist+"&c="+country+"&f="+epoch+"&oo="+getObjectList();
505 521
    url2 += "&min=0&max="+MAX_LEVEL+"&lo="+MAX_PLACES;
506 522
    String hash = computeHash( url2, salt.getBytes() );
507 523

  

Also available in: Unified diff