com.github.phisgr.dds.internalReExport.kt Maven / Gradle / Ivy
package com.github.phisgr.dds
// putting static fields/methods in Java in the top level in Kotlin
val S: Suit = Strain.S
val H: Suit = Strain.H
val D: Suit = Strain.D
val C: Suit = Strain.C
val N: Strain = Strain.N
val SUITS: List = Strain.SUITS
fun Int.toSuit(): Suit = Suit.fromInt(this)
val STRAINS: List = Strain.STRAINS
fun Int.toStrain(): Strain = Strain.fromInt(this)
/**
* [ContractType.denom] is encoded differently.
*/
internal fun Int.toContractTypeDenom(): Strain = ((this + 4) % 5).toStrain()
val NORTH: Direction = Seats.N
val EAST: Direction = Seats.E
val SOUTH: Direction = Seats.S
val WEST: Direction = Seats.W
val DIRECTIONS: List = Seats.DIRECTIONS
fun Int.toDirection(): Direction = Direction.fromInt(this)
val SEATS: List = Seats.SEATS
fun Int.toSeats(): Seats = Seats.fromInt(this)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy