This commit is contained in:
Joshua Sigona 2021-03-27 13:22:46 +09:00
parent 161d1bee28
commit bdd19231a1
3 changed files with 25 additions and 11 deletions

View File

@ -22,6 +22,7 @@ import java.util.Scanner;
import javax.imageio.ImageIO;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
@ -349,6 +350,7 @@ public class App
case 2:{
if (scores.size()>20) {
//See if this score is already in list.
if (StringUtils.isNumeric(ss)) {
int thisScore = Integer.parseInt(ss);
boolean found=false;
for (int i=0;i<scores.size();i++) {
@ -357,12 +359,24 @@ public class App
break;
}
}
if (StringUtils.isNumeric(ss)) {
if (!found&&scores.size()<ranks.length) {
scores.add(thisScore);
}
} else {
scores.add(Integer.parseInt(ss));
scores.add(0);
}
} else {
scores.add(0);
}
} else {
if (StringUtils.isNumeric(ss)) {
scores.add(Integer.parseInt(ss));
} else {
scores.add(0);
}
}
}break;
case 0:{
names.add(ss);

Binary file not shown.