Advertisement
Bibihest

Untitled

Mar 23rd, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 0.73 KB | None | 0 0
  1.     val quotes = listOf("Look behind you, \na Three-Headed Monkey!", "You fight like a dairy farmer",
  2.         "I am Guybrush Threepwood, mighty pirate", "So you want to be a pirate, eh? \nYou look more like a flooring inspector",
  3.         "Sometimes when it's quiet, \nI can still hear the monkeys", "I think we're having a real moment here")
  4.  
  5.     when (i) {
  6.         0 -> output.text = getString(R.string.quote1)
  7.         1 -> output.text = getString(R.string.quote2)
  8.         2 -> output.text = getString(R.string.quote3)
  9.         3 -> output.text = getString(R.string.quote4)
  10.         4 -> output.text = getString(R.string.quote)
  11.         5 -> output.text = getString(R.string.quote5)
  12.         else -> output.text = quotes[(0..5).random()]
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement