天天纠结吃什么的小伙伴不用再纠结了
// What to eat?
val restaurants : Array<String> = arrayOf(
"老街",
"煲仔饭",
"麻辣烫",
"摊摊面",
"客家蒸菜馆",
"老西安",
"黄焖鸡",
"兰州拉面",
"炒粉",
"张姐烤肉脆皮鸡拌饭",
"碉楼小馆",
"东北饺子馆",
"吉多福",
"老银川",
"让我遇见你",
"KFC",
"红荔村",
"Kao铺",
"金马茶餐厅",
"三及第",
"自选快餐",
"不吃")
var num : Int = (Math.random() * restaurants.size).toInt()
println(restaurants[num])
执行以下命令就知道吃什么了:
kotlinc -script what_to_eat.kts