Relative Content

Tag Archive for androidkotlinmvvmandroid-jetpack-composekotlin-coroutines

Val Variable Keeps Changing Without Any Reassignment

I’ve been working on a basic snake game wirh 3 level. First 2 of them are working completely fine, but the 3rd one is causing trouble. Even though all of the code except for one extra feature (viewModel’s extraWalls variable) is same, idk why this error is occuring only in this one.

Snake Game Food Updation Working Randomly in ViewModel Coroutine

I’m trynna build a basic snake game for android. Everything is working just fine except for the food updation. It is working randomly, sometimes when you eat it, new food appears, sometimes literally nothing happens, and sometimes, when you pass from right next to the food, it gets considered as eating it, and sometimes the food just doesn’t appear on the screen until a few seconds pass by.