Revision 78e05793
Added by Leszek Koltunski almost 2 years ago
- ID 78e057935963371c9ec6f24d18902d7bb1911664
- Parent b3b79e9b
src/main/java/org/distorted/objectlib/json/JsonReader.java | ||
---|---|---|
835 | 835 |
|
836 | 836 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
837 | 837 |
|
838 |
public int readNumScrambles(Context context, String fileName) throws IOException, JSONException
|
|
838 |
public void readNumScramblesAndComplexity(Context context, String fileName) throws IOException, JSONException
|
|
839 | 839 |
{ |
840 | 840 |
File file = new File(context.getFilesDir(), fileName); |
841 | 841 |
InputStream stream = new FileInputStream(file); |
... | ... | |
849 | 849 |
|
850 | 850 |
JSONObject object = new JSONObject(contents.toString()); |
851 | 851 |
JSONObject metadata = object.getJSONObject("metadata"); |
852 |
return metadata.getInt("scrambles"); |
|
852 |
mNumScrambles = metadata.getInt("scrambles"); |
|
853 |
mComplexity = metadata.getInt("complexity"); |
|
853 | 854 |
} |
854 | 855 |
|
855 | 856 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Sort the objects in the object popup by difficulty level.