Randomized question order

This commit is contained in:
luca0N! 2021-03-16 00:57:42 -03:00
parent 7d92099a95
commit c3c820715b
Signed by: luca0N
GPG Key ID: 2E7B4655CF16D7D6
1 changed files with 4 additions and 0 deletions

View File

@ -43,6 +43,7 @@ import java.net.Proxy;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import com.luca0n.joguitos.pluck.R;
import com.luca0n.joguitos.pluck.PluckApplication;
@ -152,6 +153,9 @@ public class ApiUtil {
if (questions.size() == 0)
throw new NoTriviaResultsException();
// Shuffle the question array.
Collections.shuffle(questions);
return questions;
}
}