Reduce redundancy and simplify my Kotlin code
I have made a simple Kotlin application called Rock-Paper-Scissor-Lizard-Spock. The application takes in user input and check if belongs to given set of array. If it belongs then it compares user input and random value from array to generate result. Else it prints error and asks for user input again. My code is working fine. Is it possible to simplify my code?
fun getUserChoice(userChoice: Array): String {
var isValidChoice = false
var userValue = ""
while (!isValidChoice) {...