feat: Quick fix on QuizRandom

nettoyage
tomivt 3 weeks ago
parent 00d9b12f56
commit aa7505f05d

@ -98,7 +98,5 @@ object QuestionStub {
question1, question2, question3, question4, question5, question6, question7, question8, question9, question10 question1, question2, question3, question4, question5, question6, question7, question8, question9, question10
) )
val allQuestionsShuffled: List<Question> = listOf( val shuffleRandomQuestions: List<Question> = allQuestions.shuffled().take(10)
question1, question2, question3, question4, question5, question6, question7, question8, question9, question10
).shuffled()
} }

@ -84,7 +84,7 @@ fun QuizEndPage(
textAlign = TextAlign.Center textAlign = TextAlign.Center
) )
) )
val nbQuestions = QuestionStub.allQuestionsShuffled.size val nbQuestions = 10
Text( Text(
text = "Nombres de Questions : $nbQuestions", text = "Nombres de Questions : $nbQuestions",
color = Color.White, color = Color.White,

@ -30,7 +30,7 @@ fun QuizRandom(
navSearch: () -> Unit, navSearch: () -> Unit,
navControllerQuizEnd: (Int, Int) -> Unit, navControllerQuizEnd: (Int, Int) -> Unit,
) { ) {
val questions = QuestionStub.allQuestionsShuffled val questions = QuestionStub.shuffleRandomQuestions
var idCurrentQuestion by remember { mutableIntStateOf(0) } var idCurrentQuestion by remember { mutableIntStateOf(0) }
var pts by remember { mutableIntStateOf(0) } var pts by remember { mutableIntStateOf(0) }
var lifes by remember { mutableIntStateOf(3) } var lifes by remember { mutableIntStateOf(3) }

Loading…
Cancel
Save