diff --git a/ArcadeReader.java b/ArcadeReader.java index 5c9e1cd..024b984 100644 --- a/ArcadeReader.java +++ b/ArcadeReader.java @@ -196,7 +196,7 @@ public class ArcadeReader { 9/*difficulty*/, 0.0/*pct*/, 287/*maxcombo*/, - "{ex:1411,fast:18,slow:62,playstyle:\"\",diff:\"\"}"/*other*/); + "{\"ex\":1411,\"fast\":18,\"slow\":62,\"playstyle\":\"\",\"diff\":\"\"}"/*other*/); test("ddr2.png",DDRReader.class, 875800/*score*/, DDR_APLUS/*rank*/, @@ -204,7 +204,7 @@ public class ArcadeReader { 11/*difficulty*/, 0.0/*pct*/, 230/*maxcombo*/, - "{ex:1529,fast:105,slow:217,playstyle:\"\",diff:\"\"}"/*other*/); + "{\"ex\":1529,\"fast\":105,\"slow\":217,\"playstyle\":\"\",\"diff\":\"\"}"/*other*/); test("ddr3.png",DDRReader.class, 991000/*score*/, DDR_AAA/*rank*/, @@ -212,7 +212,7 @@ public class ArcadeReader { 9/*difficulty*/, 0.0/*pct*/, 526/*maxcombo*/, - "{ex:1701,fast:16,slow:95,playstyle:\"\",diff:\"\"}"/*other*/); + "{\"ex\":1701,\"fast\":16,\"slow\":95,\"playstyle\":\"\",\"diff\":\"\"}"/*other*/); test("ddr4.png",DDRReader.class, 959410/*score*/, DDR_AAPLUS/*rank*/, @@ -220,7 +220,7 @@ public class ArcadeReader { 10/*difficulty*/, 0.0/*pct*/, 310/*maxcombo*/, - "{ex:2128,fast:158,slow:82,playstyle:\"\",diff:\"\"}"/*other*/); + "{\"ex\":2128,\"fast\":158,\"slow\":82,\"playstyle\":\"\",\"diff\":\"\"}"/*other*/); test("ddr5.png",DDRReader.class, 996070/*score*/, DDR_AAA/*rank*/, @@ -228,7 +228,7 @@ public class ArcadeReader { 12/*difficulty*/, 0.0/*pct*/, 339/*maxcombo*/, - "{ex:997,fast:14,slow:36,playstyle:\"\",diff:\"\"}"/*other*/); + "{\"ex\":997,\"fast\":14,\"slow\":36,\"playstyle\":\"\",\"diff\":\"\"}"/*other*/); test("ddr6.png",DDRReader.class, 995410/*score*/, DDR_AAA/*rank*/, @@ -236,7 +236,7 @@ public class ArcadeReader { 13/*difficulty*/, 0.0/*pct*/, 779/*maxcombo*/, - "{ex:1322,fast:20,slow:54,playstyle:\"\",diff:\"\"}"/*other*/); + "{\"ex\":1322,\"fast\":20,\"slow\":54,\"playstyle\":\"\",\"diff\":\"\"}"/*other*/); test("ddr7.png",DDRReader.class, 940300/*score*/, DDR_AA/*rank*/, @@ -244,7 +244,7 @@ public class ArcadeReader { 14/*difficulty*/, 0.0/*pct*/, 100/*maxcombo*/, - "{ex:1258,fast:51,slow:82,playstyle:\"\",diff:\"\"}"/*other*/); + "{\"ex\":1258,\"fast\":51,\"slow\":82,\"playstyle\":\"\",\"diff\":\"\"}"/*other*/); test("ddr8.png",DDRReader.class, 978970/*score*/, DDR_AAPLUS/*rank*/, @@ -252,7 +252,7 @@ public class ArcadeReader { 15/*difficulty*/, 0.0/*pct*/, 320/*maxcombo*/, - "{ex:1541,fast:72,slow:83,playstyle:\"\",diff:\"\"}"/*other*/); + "{\"ex\":1541,\"fast\":72,\"slow\":83,\"playstyle\":\"\",\"diff\":\"\"}"/*other*/); test("ddr9.png",DDRReader.class, 891770/*score*/, DDR_APLUS/*rank*/, @@ -260,7 +260,7 @@ public class ArcadeReader { 16/*difficulty*/, 0.0/*pct*/, 211/*maxcombo*/, - "{ex:1633,fast:186,slow:99,playstyle:\"\",diff:\"\"}"/*other*/); + "{\"ex\":1633,\"fast\":186,\"slow\":99,\"playstyle\":\"\",\"diff\":\"\"}"/*other*/); test("ddr10.png",DDRReader.class, 867270/*score*/, DDR_APLUS/*rank*/, @@ -268,7 +268,7 @@ public class ArcadeReader { 17/*difficulty*/, 0.0/*pct*/, 80/*maxcombo*/, - "{ex:1457,fast:166,slow:110,playstyle:\"\",diff:\"\"}"/*other*/); + "{\"ex\":1457,\"fast\":166,\"slow\":110,\"playstyle\":\"\",\"diff\":\"\"}"/*other*/); test("ddr11.png",DDRReader.class, 201760/*score*/, DDR_E/*rank*/, @@ -276,7 +276,7 @@ public class ArcadeReader { 18/*difficulty*/, 0.0/*pct*/, 65/*maxcombo*/, - "{ex:329,fast:62,slow:10,playstyle:\"\",diff:\"\"}"/*other*/); + "{\"ex\":329,\"fast\":62,\"slow\":10,\"playstyle\":\"\",\"diff\":\"\"}"/*other*/); test("itg1.png",ITGReader.class, 8020/*score*/, ITG_APLUS/*rank*/, @@ -473,7 +473,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 78/*maxcombo*/, - "{failed:false}"/*other*/); + "{\"failed\":false}"/*other*/); test("popn2.png",PopnReader.class, 81259/*score*/, POPN_B/*rank*/, @@ -481,7 +481,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 112/*maxcombo*/, - "{failed:false}"/*other*/); + "{\"failed\":false}"/*other*/); test("popn3.png",PopnReader.class, 79269/*score*/, POPN_B/*rank*/, @@ -489,7 +489,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 99/*maxcombo*/, - "{failed:false}"/*other*/); + "{\"failed\":false}"/*other*/); test("popn4.png",PopnReader.class, 80911/*score*/, POPN_B/*rank*/, @@ -497,7 +497,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 157/*maxcombo*/, - "{failed:false}"/*other*/); + "{\"failed\":false}"/*other*/); test("popn5.png",PopnReader.class, 78495/*score*/, POPN_B/*rank*/, @@ -505,7 +505,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 127/*maxcombo*/, - "{failed:false}"/*other*/); + "{\"failed\":false}"/*other*/); test("popn6.png",PopnReader.class, 80173/*score*/, POPN_B/*rank*/, @@ -513,7 +513,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 153/*maxcombo*/, - "{failed:false}"/*other*/); + "{\"failed\":false}"/*other*/); test("popn7.png",PopnReader.class, 79907/*score*/, POPN_B/*rank*/, @@ -521,7 +521,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 122/*maxcombo*/, - "{failed:false}"/*other*/); + "{\"failed\":false}"/*other*/); test("popn8.png",PopnReader.class, 80814/*score*/, POPN_B/*rank*/, @@ -529,7 +529,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 103/*maxcombo*/, - "{failed:false}"/*other*/); + "{\"failed\":false}"/*other*/); test("popn9.png",PopnReader.class, 82848/*score*/, POPN_A/*rank*/, @@ -537,7 +537,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 202/*maxcombo*/, - "{failed:false}"/*other*/); + "{\"failed\":false}"/*other*/); test("popn10.png",PopnReader.class, 81631/*score*/, POPN_B/*rank*/, @@ -545,7 +545,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 145/*maxcombo*/, - "{failed:false}"/*other*/); + "{\"failed\":false}"/*other*/); test("popn11.png",PopnReader.class, 80875/*score*/, POPN_B/*rank*/, @@ -553,7 +553,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 123/*maxcombo*/, - "{failed:false}"/*other*/); + "{\"failed\":false}"/*other*/); test("popn12.png",PopnReader.class, 81600/*score*/, POPN_B/*rank*/, @@ -561,7 +561,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 199/*maxcombo*/, - "{failed:false}"/*other*/); + "{\"failed\":false}"/*other*/); test("popn13.png",PopnReader.class, 87204/*score*/, POPN_A/*rank*/, @@ -569,7 +569,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 420/*maxcombo*/, - "{failed:false}"/*other*/); + "{\"failed\":false}"/*other*/); test("popn14.png",PopnReader.class, 83279/*score*/, POPN_A/*rank*/, @@ -577,7 +577,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 332/*maxcombo*/, - "{failed:false}"/*other*/); + "{\"failed\":false}"/*other*/); test("popn15.png",PopnReader.class, 86786/*score*/, POPN_A/*rank*/, @@ -585,7 +585,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 276/*maxcombo*/, - "{failed:false}"/*other*/); + "{\"failed\":false}"/*other*/); test("sdvx1.png",SoundVoltexReader.class, 3019559/*score*/, SDVX_D/*rank*/, @@ -593,7 +593,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 233/*maxcombo*/, - "{ex:1696,chip_scritical:72,chip_critical:65,chip_near:115,chip_error:240,long_scritical:79,long_error:93,vol_scritical:344,vol_error:262,failed:true}"/*other*/); + "{\"ex\":1696,\"chip_scritical\":72,\"chip_critical\":65,\"chip_near\":115,\"chip_error\":240,\"long_scritical\":79,\"long_error\":93,\"vol_scritical\":344,\"vol_error\":262,\"failed\":true}"/*other*/); test("sdvx2.png",SoundVoltexReader.class, 2060643/*score*/, SDVX_D/*rank*/, @@ -601,7 +601,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 87/*maxcombo*/, - "{ex:361,chip_scritical:5,chip_critical:5,chip_near:3,chip_error:26,long_scritical:53,long_error:79,vol_scritical:102,vol_error:4,failed:true}"/*other*/); + "{\"ex\":361,\"chip_scritical\":5,\"chip_critical\":5,\"chip_near\":3,\"chip_error\":26,\"long_scritical\":53,\"long_error\":79,\"vol_scritical\":102,\"vol_error\":4,\"failed\":true}"/*other*/); test("sdvx3.png",SoundVoltexReader.class, 8759328/*score*/, SDVX_A/*rank*/, @@ -609,7 +609,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 257/*maxcombo*/, - "{ex:5816,chip_scritical:408,chip_critical:296,chip_near:244,chip_error:67,long_scritical:423,long_error:11,vol_scritical:629,vol_error:66,failed:true}"/*other*/); + "{\"ex\":5816,\"chip_scritical\":408,\"chip_critical\":296,\"chip_near\":244,\"chip_error\":67,\"long_scritical\":423,\"long_error\":11,\"vol_scritical\":629,\"vol_error\":66,\"failed\":true}"/*other*/); test("sdvx4.png",SoundVoltexReader.class, 9129755/*score*/, SDVX_APLUS/*rank*/, @@ -617,7 +617,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 234/*maxcombo*/, - "{ex:4882,chip_scritical:274,chip_critical:193,chip_near:170,chip_error:32,long_scritical:308,long_error:13,vol_scritical:892,vol_error:37,failed:true}"/*other*/); + "{\"ex\":4882,\"chip_scritical\":274,\"chip_critical\":193,\"chip_near\":170,\"chip_error\":32,\"long_scritical\":308,\"long_error\":13,\"vol_scritical\":892,\"vol_error\":37,\"failed\":true}"/*other*/); test("sdvx5.png",SoundVoltexReader.class, 9653667/*score*/, SDVX_AAPLUS/*rank*/, @@ -625,7 +625,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 593/*maxcombo*/, - "{ex:4119,chip_scritical:173,chip_critical:109,chip_near:65,chip_error:4,long_scritical:375,long_error:1,vol_scritical:969,vol_error:22,failed:false}"/*other*/); + "{\"ex\":4119,\"chip_scritical\":173,\"chip_critical\":109,\"chip_near\":65,\"chip_error\":4,\"long_scritical\":375,\"long_error\":1,\"vol_scritical\":969,\"vol_error\":22,\"failed\":false}"/*other*/); test("sdvx6.png",SoundVoltexReader.class, 9498351/*score*/, SDVX_AA/*rank*/, @@ -633,7 +633,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 372/*maxcombo*/, - "{ex:5525,chip_scritical:341,chip_critical:185,chip_near:99,chip_error:8,long_scritical:345,long_error:17,vol_scritical:1096,vol_error:32,failed:false}"/*other*/); + "{\"ex\":5525,\"chip_scritical\":341,\"chip_critical\":185,\"chip_near\":99,\"chip_error\":8,\"long_scritical\":345,\"long_error\":17,\"vol_scritical\":1096,\"vol_error\":32,\"failed\":false}"/*other*/); test("sdvx7.png",SoundVoltexReader.class, 9498351/*score*/, SDVX_AA/*rank*/, @@ -641,7 +641,7 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 372/*maxcombo*/, - "{ex:5525,chip_scritical:341,chip_critical:185,chip_near:99,chip_error:8,long_scritical:345,long_error:17,vol_scritical:1096,vol_error:32,failed:false}"/*other*/); + "{\"ex\":5525,\"chip_scritical\":341,\"chip_critical\":185,\"chip_near\":99,\"chip_error\":8,\"long_scritical\":345,\"long_error\":17,\"vol_scritical\":1096,\"vol_error\":32,\"failed\":false}"/*other*/); test("sdvx8.png",SoundVoltexReader.class, 725020/*score*/, SDVX_D/*rank*/, @@ -649,6 +649,6 @@ public class ArcadeReader { 0/*difficulty*/, 0.0/*pct*/, 21/*maxcombo*/, - "{ex:457,chip_scritical:13,chip_critical:15,chip_near:31,chip_error:201,long_scritical:44,long_error:241,vol_scritical:91,vol_error:272,failed:true}"/*other*/); + "{\"ex\":457,\"chip_scritical\":13,\"chip_critical\":15,\"chip_near\":31,\"chip_error\":201,\"long_scritical\":44,\"long_error\":241,\"vol_scritical\":91,\"vol_error\":272,\"failed\":true}"/*other*/); } } diff --git a/database/recentplays b/database/recentplays new file mode 100644 index 0000000..e69de29 diff --git a/database/recentrecords b/database/recentrecords new file mode 100644 index 0000000..e69de29 diff --git a/readers/DDRReader.java b/readers/DDRReader.java index 84a6d35..881405e 100644 --- a/readers/DDRReader.java +++ b/readers/DDRReader.java @@ -261,19 +261,19 @@ public class DDRReader extends Reader{ notes[5]=convertToInt(splitter); }break; case 8:{ - other="{ex:"+convertToInt(splitter); + other="{\"ex\":"+convertToInt(splitter); }break; case 9:{ - other=other+",fast:"+convertToInt(splitter); + other=other+",\"fast\":"+convertToInt(splitter); }break; case 10:{ - other=other+",slow:"+convertToInt(splitter); + other=other+",\"slow\":"+convertToInt(splitter); }break; case 11:{ difficulty=convertToInt(splitter); }break; case 12:{ - other=other+",playstyle:\""+convertToString(splitter)+"\""; + other=other+",\"playstyle\":\""+convertToString(splitter)+"\""; }break; case 13:{ if (failed) { @@ -299,7 +299,7 @@ public class DDRReader extends Reader{ title=convertToString(splitter); }break; case 15:{ - other=other+",diff:\""+convertToString(splitter)+"\"}"; + other=other+",\"diff\":\""+convertToString(splitter)+"\"}"; }break; } } diff --git a/readers/PopnReader.java b/readers/PopnReader.java index 0aef3c3..26fe8ea 100644 --- a/readers/PopnReader.java +++ b/readers/PopnReader.java @@ -244,7 +244,7 @@ public class PopnReader extends Reader{ title=convertToString(splitter); }break; case 9:{ - other="{failed:"+failed+"}"; + other="{\"failed\":"+failed+"}"; if (score>=98000) {rank=0;/*S*/} else if (score>=95000) {rank=1;/*AAA*/} else if (score>=90000) {rank=2;/*AA*/} else diff --git a/readers/Reader.java b/readers/Reader.java index f9c771f..02d3f2e 100644 --- a/readers/Reader.java +++ b/readers/Reader.java @@ -335,9 +335,9 @@ public abstract class Reader{ } @Override public String toString() { - return "Reader [difficulty=" + difficulty + ", maxcombo=" + maxcombo + ", notes=" + Arrays.toString(notes) - + ", other=" + other + ", pct=" + pct + ", rank=" + rank + ", score=" + score + ", title=" + title - + "]"; + return "{\"game\":\""+getClass().getSimpleName()+"\",\"difficulty\":" + difficulty + ", \"maxcombo\":" + maxcombo + ", \"notes\":" + Arrays.toString(notes) + + ", \"other\":" + other + ", \"pct\":" + pct + ", \"rank\":" + rank + ", \"score\":" + score + ", \"title\":\"" + title.replaceAll(Pattern.quote("\n"),"\\\\n") + + "\"}"; } @Override public int hashCode() { diff --git a/readers/SoundVoltexReader.java b/readers/SoundVoltexReader.java index 7dc797e..7596df9 100644 --- a/readers/SoundVoltexReader.java +++ b/readers/SoundVoltexReader.java @@ -430,7 +430,7 @@ public class SoundVoltexReader extends Reader{ score=convertToInt(new String[]{Integer.toString(score),score2}); }break; case 3:{ - other+="{ex:"+Integer.toString(convertToInt("EX SCORE",splitter))+","; + other+="{\"ex\":"+Integer.toString(convertToInt("EX SCORE",splitter))+","; }break; case 4:{ pct=convertToDouble(splitter);//We're lucky excessive and effective rate have the same number of characters... @@ -460,28 +460,28 @@ public class SoundVoltexReader extends Reader{ notes[6]=convertToInt("ERROR",splitter); }break; case 12:{ - other+="chip_scritical:"+Integer.toString(convertToInt("S-Critical",splitter))+","; + other+="\"chip_scritical\":"+Integer.toString(convertToInt("S-Critical",splitter))+","; }break; case 13:{ - other+="chip_critical:"+Integer.toString(convertToInt("Critical",splitter))+","; + other+="\"chip_critical\":"+Integer.toString(convertToInt("Critical",splitter))+","; }break; case 14:{ - other+="chip_near:"+Integer.toString(convertToInt("NEAR",splitter))+","; + other+="\"chip_near\":"+Integer.toString(convertToInt("NEAR",splitter))+","; }break; case 15:{ - other+="chip_error:"+Integer.toString(convertToInt("ERROR",splitter))+","; + other+="\"chip_error\":"+Integer.toString(convertToInt("ERROR",splitter))+","; }break; case 16:{ - other+="long_scritical:"+Integer.toString(convertToInt("S-Critical",splitter))+","; + other+="\"long_scritical\":"+Integer.toString(convertToInt("S-Critical",splitter))+","; }break; case 17:{ - other+="long_error:"+Integer.toString(convertToInt("ERROR",splitter))+","; + other+="\"long_error\":"+Integer.toString(convertToInt("ERROR",splitter))+","; }break; case 18:{ - other+="vol_scritical:"+Integer.toString(convertToInt("S-CRITICAL",splitter))+","; + other+="\"vol_scritical\":"+Integer.toString(convertToInt("S-CRITICAL",splitter))+","; }break; case 19:{ - other+="vol_error:"+Integer.toString(convertToInt("ERROR",splitter))+","; + other+="\"vol_error\":"+Integer.toString(convertToInt("ERROR",splitter))+","; }break; case 20:{ maxcombo=convertToInt("MAXIMUM CHAIN",splitter); @@ -490,7 +490,7 @@ public class SoundVoltexReader extends Reader{ difficulty=convertToInt("EXH",splitter); }break; case 22:{ - other+="failed:"+failed+"}"; + other+="\"failed\":"+failed+"}"; if (score>=9900000) {rank=0;/*S*/} else if (score>=9800000) {rank=1;/*AAA+*/} else if (score>=9700000) {rank=2;/*AAA*/} else diff --git a/result.png b/result.png index 33b9246..46e0142 100644 Binary files a/result.png and b/result.png differ diff --git a/sigPlace.java b/sigPlace.java index 3c4b980..2d56ed7 100644 --- a/sigPlace.java +++ b/sigPlace.java @@ -119,6 +119,9 @@ public class sigPlace { }*/ //new PopnReader().interpretBoxes(Paths.get("tests","popn8.png"),true); ArcadeReader.runTests(); + PopnReader p = new PopnReader(); + p.interpretBoxes(Paths.get("tests","popn8.png")); + System.out.println(p); /* Path secretFile = Paths.get(".clientsecret"); List data; try { diff --git a/sub.png b/sub.png index cc76ab2..2630e77 100644 Binary files a/sub.png and b/sub.png differ