mirror of
https://github.com/Noratrieb/UselessClasses.git
synced 2026-01-14 16:45:09 +01:00
hallo
This commit is contained in:
parent
73207c6bb2
commit
095fb3ee15
1 changed files with 8 additions and 6 deletions
|
|
@ -8,7 +8,7 @@ import java.util.ArrayList;
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Every trivia question has 4 answers, giving us a random number out of 4 for every question
|
* Every trivia question has 4 answers, giving us a random number out of 4 for every question
|
||||||
* 2 question can give an octal digit, which can be converted to an int
|
* so now we just use the 4 as two binary digits and use them lol
|
||||||
* 200IQ move, ik
|
* 200IQ move, ik
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
|
|
@ -44,11 +44,13 @@ public class GoodRandom {
|
||||||
private int getFourDigit(){
|
private int getFourDigit(){
|
||||||
trivia.getTrivia();
|
trivia.getTrivia();
|
||||||
ArrayList<String> answers = new ArrayList<>();
|
ArrayList<String> answers = new ArrayList<>();
|
||||||
answers.add(trivia.getCorrectAnswer());
|
String[] inc = trivia.getIncorrectAnswers();
|
||||||
answers.add(trivia.getIncorrectAnswers()[0]);
|
String cor = trivia.getCorrectAnswer();
|
||||||
answers.add(trivia.getIncorrectAnswers()[1]);
|
answers.add(cor);
|
||||||
answers.add(trivia.getIncorrectAnswers()[2]);
|
answers.add(inc[0]);
|
||||||
|
answers.add(inc[1]);
|
||||||
|
answers.add(inc[2]);
|
||||||
answers.sort(null);
|
answers.sort(null);
|
||||||
return answers.indexOf(trivia.getCorrectAnswer());
|
return answers.indexOf(cor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue