Kotlin 枚举 enum 与函数
data class Coordinate(var x: Int, var y: Int) { operator fun plus(c2: Coordinate2) = Coordinate(x + c2.x, y + c2.y)}enum class Direction (private val coordinate:Coordinate){ EAST(Coordinate(1,0)), WEST(Coordinate(-1,0)), SOUTH(Coordinat.