package Ġcom . example . android . g ues st he word . screens . score Ċ Ċ import Ġandroid . util . Log Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . lifecycle . Mutable LiveData Ċ import Ġandroidx . lifecycle . ViewModel Ċ Ċ class ĠScore ViewModel ( final Score : Int ): ViewModel () Ġ{ ĊĠĠĠ Ġprivate Ġval Ġ_ score = Mutable LiveData < Int >() ĊĠĠĠ Ġval Ġscore : LiveData < Int > ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġ_ score ĊĊĠĠĠ Ġprivate Ġval Ġ_ event Play Again = Mutable LiveData < Boolean >() ĊĠĠĠ Ġval Ġevent Play Again : LiveData < Boolean > ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġ_ event Play Again ĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ Ġ_ score . value = final Score ĊĊĠĠĠĠ ĠLog . i (" Score ViewModel "," Final Ġscore Ġis Ġ${ final Score }") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġplay Again (){ ĊĠĠĠĠĠĠĠ Ġ_ event Play Again . value = true ĊĠĠĠ Ġ} ĊĠĠĠ Ġfun Ġreset Play Again (){ ĊĠĠĠĠĠĠĠ Ġ_ event Play Again . value = false ĊĠĠĠ Ġ} ĊĊ Ċ }