ITG grading system implemented (#3)

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2, Sig, Sigo 3 years ago
parent 1a3dcc5713
commit a0c92e7b38
  1. 2
      ArcadeReader.java
  2. 26
      readers/ITGReader.java
  3. BIN
      result.png
  4. 2
      sigPlace.java
  5. BIN
      sub.png

@ -59,6 +59,6 @@ public class ArcadeReader {
*
*/
public static void retrieveData(Path img) {
new PopnReader().interpretBoxes(img);
new ITGReader().interpretBoxes(img);
}
}

@ -20,6 +20,7 @@ public class ITGReader extends Reader{
final static int REGION_PADDING = 32;
List<Box> extraRegions = new ArrayList<>();
static int lastJump=0;
boolean failed=false;
public ITGReader(){
addRegion(new Box(388,552,227,60),NUMBER); //score[0]
addRegion(new Box(797,438,164,58),NUMBER); //fantastic+[1]
@ -220,6 +221,31 @@ public class ITGReader extends Reader{
case 9:{
other=convertToString(splitter);
}break;
case 10:{
if (convertToString(splitter).equals("F")) {
failed=true;
}
if (failed) {
rank=17;/*F*/
} else
if (pct>=100) {rank=0;/*Quad*/} else
if (pct>=99) {rank=1;/*Trip*/} else
if (pct>=98) {rank=2;/*Doub*/} else
if (pct>=96) {rank=3;/*Star*/} else
if (pct>=94) {rank=4;/*S+*/} else
if (pct>=92) {rank=5;/*S*/} else
if (pct>=89) {rank=6;/*S-*/} else
if (pct>=86) {rank=7;/*A+*/} else
if (pct>=83) {rank=8;/*A*/} else
if (pct>=80) {rank=9;/*A-*/} else
if (pct>=76) {rank=10;/*B+*/} else
if (pct>=72) {rank=11;/*B*/} else
if (pct>=68) {rank=12;/*B-*/} else
if (pct>=64) {rank=13;/*C+*/} else
if (pct>=60) {rank=14;/*C*/} else
if (pct>=55) {rank=15;/*C-*/} else
{rank=16;/*D*/}
}
case 11:{
title=convertToString(splitter);
}break;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

After

Width:  |  Height:  |  Size: 16 KiB

@ -116,7 +116,7 @@ public class sigPlace {
// TODO Auto-generated catch block
e.printStackTrace();
}*/
ArcadeReader.retrieveData(Paths.get("popn5.png"));
ArcadeReader.retrieveData(Paths.get("itg15.png"));
/* Path secretFile = Paths.get(".clientsecret");
List<String> data;
try {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Loading…
Cancel
Save