You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import com.example.android.unscramble.data.MAX_NO_OF_WORDS
private fun updateGameState(updatedScore: Int) {
if (usedWords.size == MAX_NO_OF_WORDS){
//Last round in the game
} else{
// Normal round in the game
_uiState.update { currentState ->
currentState.copy(
isGuessedWordWrong = false,
currentScrambledWord = pickRandomWordAndShuffle(),
currentWordCount = currentState.currentWordCount.inc(),
score = updatedScore
)
}
}
}
The "android" should not be in the path. The path should be "import com.example.unscramble.data.MAX_NO_OF_WORDS"
The text was updated successfully, but these errors were encountered:
Section:
9. Handle last round of game
In the code snippet:
The "android" should not be in the path. The path should be "import com.example.unscramble.data.MAX_NO_OF_WORDS"
The text was updated successfully, but these errors were encountered: