Randomized question order
This commit is contained in:
parent
7d92099a95
commit
c3c820715b
|
@ -43,6 +43,7 @@ import java.net.Proxy;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
import com.luca0n.joguitos.pluck.R;
|
import com.luca0n.joguitos.pluck.R;
|
||||||
import com.luca0n.joguitos.pluck.PluckApplication;
|
import com.luca0n.joguitos.pluck.PluckApplication;
|
||||||
|
@ -152,6 +153,9 @@ public class ApiUtil {
|
||||||
if (questions.size() == 0)
|
if (questions.size() == 0)
|
||||||
throw new NoTriviaResultsException();
|
throw new NoTriviaResultsException();
|
||||||
|
|
||||||
|
// Shuffle the question array.
|
||||||
|
Collections.shuffle(questions);
|
||||||
|
|
||||||
return questions;
|
return questions;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue