Kotlin shuffle a list and validate list value with user value
I have a list that holds string values as directions, for each time is started is shuffle the list
val directions = mutableListOf("left","right","up","down")
directions.shuffle()
I am running a continuous loop to check if the percentage value has grown to a certain point before breaking the loop
if(progress != 100){
//continue until progress is 100
}
I send the instructions to the user and if they match the progress value increases
when(directions){
"left" -> {
// print...