|
|
|
@ -322,8 +322,64 @@ public class LoveLiveReader extends Reader{ |
|
|
|
|
case 2:{ |
|
|
|
|
notes[0]=convertToInt("PERFECT",splitter); |
|
|
|
|
}break; |
|
|
|
|
case 3:{ |
|
|
|
|
notes[1]=convertToInt("GREAT",splitter); |
|
|
|
|
}break; |
|
|
|
|
case 4:{ |
|
|
|
|
notes[2]=convertToInt("GOOD",splitter); |
|
|
|
|
}break; |
|
|
|
|
case 5:{ |
|
|
|
|
notes[3]=convertToInt("BAD",splitter); |
|
|
|
|
}break; |
|
|
|
|
case 6:{ |
|
|
|
|
notes[4]=convertToInt("MISS",splitter); |
|
|
|
|
}break; |
|
|
|
|
case 7:{ |
|
|
|
|
difficulty=getDifficulty(convertToString(splitter).toLowerCase()); |
|
|
|
|
}break; |
|
|
|
|
case 8:{ |
|
|
|
|
title=convertToString(splitter); |
|
|
|
|
}break; |
|
|
|
|
case 9:{ |
|
|
|
|
pct=convertToPct(splitter); |
|
|
|
|
}break; |
|
|
|
|
case 10:{ |
|
|
|
|
maxcombo=convertToInt(splitter); |
|
|
|
|
}break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
System.out.println(this); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
double convertToPct(String[] str) { |
|
|
|
|
int front=convertToInt(new String[]{str[1]}); |
|
|
|
|
int decimal=convertToInt(new String[]{str[2]}); |
|
|
|
|
double numb=0; |
|
|
|
|
int placeValue=0; |
|
|
|
|
int decimalPlaces=0; |
|
|
|
|
while (decimal!=0) { |
|
|
|
|
numb+=(decimal%10)*(Math.pow(10,placeValue++)); |
|
|
|
|
decimal/=10; |
|
|
|
|
decimalPlaces++; |
|
|
|
|
} |
|
|
|
|
while (front!=0) { |
|
|
|
|
numb+=(front%10)*(Math.pow(10,placeValue++)); |
|
|
|
|
front/=10; |
|
|
|
|
} |
|
|
|
|
for (int i=0;i<decimalPlaces;i++) { |
|
|
|
|
numb/=10; |
|
|
|
|
} |
|
|
|
|
return numb; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int getDifficulty(String str) { |
|
|
|
|
final String[] diffs={"easy","normal","hard","master","challenge"}; |
|
|
|
|
for (int i=0;i<diffs.length;i++) { |
|
|
|
|
String diff = diffs[i].toLowerCase(); |
|
|
|
|
if (str.contains(diff)) { |
|
|
|
|
return i; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return -1; |
|
|
|
|
} |
|
|
|
|
} |