diff --git a/torisetsu/src/jsMain/kotlin/core/ComposeQuiz.kt b/torisetsu/src/jsMain/kotlin/core/ComposeQuiz.kt index ab2e7be..bfe8527 100644 --- a/torisetsu/src/jsMain/kotlin/core/ComposeQuiz.kt +++ b/torisetsu/src/jsMain/kotlin/core/ComposeQuiz.kt @@ -45,8 +45,8 @@ class ComposeQuiz : Quiz { ), ), ) - override var currentQuizId: MutableState = mutableStateOf(0) - override var currentQuizNumber: MutableState = mutableStateOf(1) + override val currentQuizId: MutableState = mutableStateOf(0) + override val currentQuizNumber: MutableState = mutableStateOf(1) override fun onClickNext(answerOption: AnswerOption, onClickFinish: (nextId: Int) -> Unit) { if (answerOption.isFinish) { diff --git a/torisetsu/src/jsMain/kotlin/core/Quiz.kt b/torisetsu/src/jsMain/kotlin/core/Quiz.kt index becb157..82c4451 100644 --- a/torisetsu/src/jsMain/kotlin/core/Quiz.kt +++ b/torisetsu/src/jsMain/kotlin/core/Quiz.kt @@ -5,8 +5,8 @@ import androidx.compose.runtime.MutableState import data.AnswerOption interface Quiz { - var currentQuizId: MutableState - var currentQuizNumber: MutableState + val currentQuizId: MutableState + val currentQuizNumber: MutableState fun onClickNext(answerOption: AnswerOption, onClickFinish: (nextId: Int) -> Unit) fun getAnswerOptions(): List fun getQuestionText(): String