package Ġcom . vh cast ro . sw o osh . controller Ċ Ċ import Ġandroid . content . Intent Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . os . Persist able Bundle Ċ import Ġandroid . view . View Ċ import Ġandroid . widget . Toast Ċ import Ġcom . vh cast ro . sw o osh . R Ċ import Ġcom . vh cast ro . sw o osh . model . Player Ċ import Ġcom . vh cast ro . sw o osh . utilities . EXTRA _ PLAYER Ċ import Ġkotlinx . android . synt hetic . main . activity _ skill .* Ċ Ċ class ĠSkill Activity Ġ: ĠBase Activity () Ġ{ ĊĊĠĠĠ Ġlateinit Ġvar Ġplayer : ĠPlayer ĊĊĠĠĠ Ġoverride Ġfun Ġon Save InstanceState ( out State : ĠBundle ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Save InstanceState ( out State ) ĊĠĠĠĠĠĠĠ Ġout State . put Parcelable ( EXTRA _ PLAYER , Ġplayer ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Restore InstanceState ( savedInstanceState : ĠBundle ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Restore InstanceState ( savedInstanceState ) ĊĠĠĠĠĠĠĠ Ġplayer Ġ= ĠsavedInstanceState . get Parcelable ( EXTRA _ PLAYER ) !! ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . activity _ skill ) ĊĠĠĠĠĠĠĠ Ġplayer Ġ= Ġintent . get Parcelable Extra ( EXTRA _ PLAYER ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġon Begin ner Clicked ( view : ĠView ){ ĊĠĠĠĠĠĠĠ Ġball er Skill Btn . isChecked Ġ= Ġfalse ĊĠĠĠĠĠĠĠ Ġplayer . skill Ġ= Ġ" begin ner " ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġon Ball er Clicked ( view : ĠView ){ ĊĠĠĠĠĠĠĠ Ġbegin ner Skill Btn . isChecked Ġ= Ġfalse ĊĠĠĠĠĠĠĠ Ġplayer . skill Ġ= Ġ" ball er " ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġon Skill Finish Clicked ( view : ĠView ){ ĊĠĠĠĠĠĠĠ Ġif ( player . skill Ġ!= Ġ"") Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġfinish Activity Ġ= ĠIntent ( this , ĠFinish Activity :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfinish Activity . putExtra ( EXTRA _ PLAYER , Ġplayer ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠstartActivity ( finish Activity ) ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠToast . makeText ( this , Ġ" Please Ġselect Ġa Ġskill Ġlevel .", ĠToast . LENGTH _ SHORT ). show () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ