メモ:
・kotlinの関数の記述は下記のような形
・kotlinのswitch文はwhenを使う。stringでスイッチさせたり、in 0..2のような範囲指定も可能
fun getColorString(colornum: Int) : String{ var color : String when (colornum){ 0 -> color = "#FFFFFF" 1 -> color = "#FFBBBB" 2 -> color = "#FFFFBB" 3 -> color = "#BBFFBB" 4 -> color = "#BBFFFF" 5 -> color = "#BBBBFF" 6 -> color = "#CC9999" 7 -> color = "#CCCC99" 8 -> color = "#99CC99" 9 -> color = "#99CCCC" 10 -> color = "#9999CC" else -> color = "#CCCCCC" } return color }