mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
19 lines
318 B
Kotlin
Vendored
19 lines
318 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
|
|
import Game.*
|
|
|
|
enum class Game {
|
|
ROCK,
|
|
PAPER,
|
|
SCISSORS,
|
|
LIZARD,
|
|
SPOCK
|
|
}
|
|
|
|
fun box(): String {
|
|
val a = arrayOf(LIZARD, SCISSORS, SPOCK, ROCK, PAPER)
|
|
a.sort()
|
|
val str = a.joinToString(" ")
|
|
return if (str == "ROCK PAPER SCISSORS LIZARD SPOCK") "OK" else "Fail: $str"
|
|
}
|