Package-level declarations

Types

Link copied to clipboard
@Serializable
@SerialName(value = "ChitoiShantenResult")
data class ChitoiShantenResult(val hand: Hand<ChitoiHandPattern>, val shantenInfo: CommonShanten) : CommonShantenResult<ChitoiHandPattern>
Link copied to clipboard
@Serializable
sealed interface CommonShanten : Shanten
Link copied to clipboard
@Serializable
data class CommonShantenArgs(val tiles: List<Tile>, val furo: List<Furo> = emptyList(), val bestShantenOnly: Boolean = false)

向听分析参数

Link copied to clipboard
@Serializable
sealed interface CommonShantenResult<out P : CommonHandPattern> : ShantenResult<CommonShanten, P>
Link copied to clipboard
@Serializable
data class FuroChanceShantenArgs(val tiles: List<Tile>, val chanceTile: Tile, val allowChi: Boolean = true, val bestShantenOnly: Boolean = false, val allowKuikae: Boolean = false)

副露判断向听分析参数

Link copied to clipboard
@Serializable
@SerialName(value = "FuroChanceShantenResult")
data class FuroChanceShantenResult(val hand: Hand<RegularHandPattern>, val shantenInfo: ShantenWithFuroChance) : ShantenResult<ShantenWithFuroChance, RegularHandPattern>
Link copied to clipboard
@Serializable
data class Improvement(val discard: Tile, val advance: Set<Tile>, val advanceNum: Int = 0)
Link copied to clipboard
@Serializable
@SerialName(value = "KokushiShantenResult")
data class KokushiShantenResult(val hand: Hand<KokushiHandPattern>, val shantenInfo: CommonShanten) : CommonShantenResult<KokushiHandPattern>
Link copied to clipboard
@Serializable
@SerialName(value = "RegularShantenResult")
data class RegularShantenResult(val hand: Hand<RegularHandPattern>, val shantenInfo: CommonShanten) : CommonShantenResult<RegularHandPattern>
Link copied to clipboard
@Serializable
sealed interface Shanten

向听信息

Link copied to clipboard
@Serializable
sealed interface ShantenResult<out S : Shanten, out P : CommonHandPattern>
Link copied to clipboard
@Serializable
@SerialName(value = "ShantenWithFuroChance")
data class ShantenWithFuroChance(val shantenNum: Int, val canRon: Boolean, val pass: ShantenWithoutGot?, val chi: Map<Tatsu, ShantenWithGot>, val pon: ShantenWithGot?, val minkan: ShantenWithoutGot?) : Shanten

有副露机会的手牌的向听信息

Link copied to clipboard
@Serializable
@SerialName(value = "ShantenWithGot")
data class ShantenWithGot(val shantenNum: Int, val discardToAdvance: Map<Tile, ShantenWithoutGot>, val ankanToAdvance: Map<Tile, ShantenWithoutGot> = emptyMap()) : CommonShanten

摸牌的手牌的向听信息

Link copied to clipboard
@Serializable
@SerialName(value = "ShantenWithoutGot")
data class ShantenWithoutGot(val shantenNum: Int, val advance: Set<Tile>, val advanceNum: Int = 0, val goodShapeAdvance: Set<Tile>? = if (shantenNum == 1) emptySet() else null, val goodShapeAdvanceNum: Int? = if (shantenNum == 1) 0 else null, val improvement: Map<Tile, List<Improvement>>? = if (shantenNum == 0) emptyMap() else null, val improvementNum: Int? = if (shantenNum == 0) 0 else null, val goodShapeImprovement: Map<Tile, List<Improvement>>? = if (shantenNum == 0) emptyMap() else null, val goodShapeImprovementNum: Int? = if (shantenNum == 0) 0 else null) : CommonShanten

未摸牌的手牌的向听信息

Link copied to clipboard
@Serializable
@SerialName(value = "UnionShantenResult")
data class UnionShantenResult(val hand: Hand<CommonHandPattern>, val shantenInfo: CommonShanten, val regular: RegularShantenResult, val chitoi: ChitoiShantenResult? = null, val kokushi: KokushiShantenResult? = null) : CommonShantenResult<CommonHandPattern>

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun chitoiShanten(tiles: List<Tile>, bestShantenOnly: Boolean = false): ChitoiShantenResult

七对子向听分析

Link copied to clipboard

fun furoChanceShanten(tiles: List<Tile>, chanceTile: Tile, allowChi: Boolean = true, bestShantenOnly: Boolean = false, allowKuikae: Boolean = false): FuroChanceShantenResult

副露判断向听分析

Link copied to clipboard
fun kokushiShanten(tiles: List<Tile>, bestShantenOnly: Boolean = false): KokushiShantenResult

国士无双向听分析

Link copied to clipboard
fun regularShanten(tiles: List<Tile>, furo: List<Furo> = listOf(), bestShantenOnly: Boolean = false): RegularShantenResult

标准形向听分析(只考虑4面子+1雀头和牌的形状)

Link copied to clipboard
fun shanten(tiles: List<Tile>, furo: List<Furo> = emptyList(), bestShantenOnly: Boolean = false): UnionShantenResult

向听分析