mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 00:21:28 +00:00
20 lines
343 B
Kotlin
Vendored
20 lines
343 B
Kotlin
Vendored
// KJS_WITH_FULL_RUNTIME
|
|
// 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"
|
|
}
|