gdgand / Effective-Java-Study-Log

7 stars 6 forks source link

러시안 룰렛 #2

Open pjhjohn opened 5 years ago

pjhjohn commented 5 years ago

🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫🔫

@Test
fun russianRoulette() {
    listOf("권태환", "정현지", "강경완", "조희주", "서효정", "윤영", "장인수", "박준호", "김대영")
        .shuffled()
        .take(5)
        .forEachIndexed { index, name ->
            println("${index + 1}등 : $name")
        }
}