com.netsensia.rivalchess.model.Colour.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rivalchess-model Show documentation
Show all versions of rivalchess-model Show documentation
The simple model classes used by Rival Chess
The newest version!
package com.netsensia.rivalchess.model
import java.util.*
enum class Colour(val value: Char) {
WHITE('w'), BLACK('b');
fun opponent(): Colour {
return if (this == WHITE) BLACK else WHITE
}
companion object {
fun list(): List {
return ArrayList(listOf(WHITE, BLACK))
}
}
}