//[mahjong-utils](../../index.md)/[mahjongutils.shanten](index.md)

# Package-level declarations

## Types

| Name | Summary |
|---|---|
| [ChitoiShantenResult](-chitoi-shanten-result/index.md) | [common]<br>@Serializable<br>@SerialName(value = &quot;ChitoiShantenResult&quot;)<br>data class [ChitoiShantenResult](-chitoi-shanten-result/index.md)(val hand: [Hand](../mahjongutils.models.hand/-hand/index.md)&lt;[ChitoiHandPattern](../mahjongutils.models.hand/-chitoi-hand-pattern/index.md)&gt;, val shantenInfo: [CommonShanten](-common-shanten/index.md)) : [CommonShantenResult](-common-shanten-result/index.md)&lt;[ChitoiHandPattern](../mahjongutils.models.hand/-chitoi-hand-pattern/index.md)&gt; |
| [CommonShanten](-common-shanten/index.md) | [common]<br>@Serializable<br>interface [CommonShanten](-common-shanten/index.md) : [Shanten](-shanten/index.md) |
| [CommonShantenResult](-common-shanten-result/index.md) | [common]<br>@Serializable<br>interface [CommonShantenResult](-common-shanten-result/index.md)&lt;out [P](-common-shanten-result/index.md) : [CommonHandPattern](../mahjongutils.models.hand/-common-hand-pattern/index.md)&gt; : [ShantenResult](-shanten-result/index.md)&lt;[CommonShanten](-common-shanten/index.md), [P](-common-shanten-result/index.md)&gt; |
| [FuroChanceShantenResult](-furo-chance-shanten-result/index.md) | [common]<br>@Serializable<br>@SerialName(value = &quot;FuroChanceShantenResult&quot;)<br>data class [FuroChanceShantenResult](-furo-chance-shanten-result/index.md)(val hand: [Hand](../mahjongutils.models.hand/-hand/index.md)&lt;[RegularHandPattern](../mahjongutils.models.hand/-regular-hand-pattern/index.md)&gt;, val shantenInfo: [ShantenWithFuroChance](-shanten-with-furo-chance/index.md)) : [ShantenResult](-shanten-result/index.md)&lt;[ShantenWithFuroChance](-shanten-with-furo-chance/index.md), [RegularHandPattern](../mahjongutils.models.hand/-regular-hand-pattern/index.md)&gt; |
| [Improvement](-improvement/index.md) | [common]<br>@Serializable<br>data class [Improvement](-improvement/index.md)(val discard: [Tile](../mahjongutils.models/-tile/index.md), val advance: [Set](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)&lt;[Tile](../mahjongutils.models/-tile/index.md)&gt;, val advanceNum: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 0) |
| [KokushiShantenResult](-kokushi-shanten-result/index.md) | [common]<br>@Serializable<br>@SerialName(value = &quot;KokushiShantenResult&quot;)<br>data class [KokushiShantenResult](-kokushi-shanten-result/index.md)(val hand: [Hand](../mahjongutils.models.hand/-hand/index.md)&lt;[KokushiHandPattern](../mahjongutils.models.hand/-kokushi-hand-pattern/index.md)&gt;, val shantenInfo: [CommonShanten](-common-shanten/index.md)) : [CommonShantenResult](-common-shanten-result/index.md)&lt;[KokushiHandPattern](../mahjongutils.models.hand/-kokushi-hand-pattern/index.md)&gt; |
| [RegularShantenResult](-regular-shanten-result/index.md) | [common]<br>@Serializable<br>@SerialName(value = &quot;RegularShantenResult&quot;)<br>data class [RegularShantenResult](-regular-shanten-result/index.md)(val hand: [Hand](../mahjongutils.models.hand/-hand/index.md)&lt;[RegularHandPattern](../mahjongutils.models.hand/-regular-hand-pattern/index.md)&gt;, val shantenInfo: [CommonShanten](-common-shanten/index.md)) : [CommonShantenResult](-common-shanten-result/index.md)&lt;[RegularHandPattern](../mahjongutils.models.hand/-regular-hand-pattern/index.md)&gt; |
| [Shanten](-shanten/index.md) | [common]<br>@Serializable<br>interface [Shanten](-shanten/index.md)<br>向听信息 |
| [ShantenResult](-shanten-result/index.md) | [common]<br>@Serializable<br>interface [ShantenResult](-shanten-result/index.md)&lt;out [S](-shanten-result/index.md) : [Shanten](-shanten/index.md), out [P](-shanten-result/index.md) : [CommonHandPattern](../mahjongutils.models.hand/-common-hand-pattern/index.md)&gt; |
| [ShantenWithFuroChance](-shanten-with-furo-chance/index.md) | [common]<br>@Serializable<br>@SerialName(value = &quot;ShantenWithFuroChance&quot;)<br>data class [ShantenWithFuroChance](-shanten-with-furo-chance/index.md)(val shantenNum: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html), val pass: [ShantenWithoutGot](-shanten-without-got/index.md)?, val chi: [Map](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)&lt;[Tatsu](../mahjongutils.models/-tatsu/index.md), [ShantenWithGot](-shanten-with-got/index.md)&gt;, val pon: [ShantenWithGot](-shanten-with-got/index.md)?, val minkan: [ShantenWithoutGot](-shanten-without-got/index.md)?) : [Shanten](-shanten/index.md)<br>有副露机会的手牌的向听信息 |
| [ShantenWithGot](-shanten-with-got/index.md) | [common]<br>@Serializable<br>@SerialName(value = &quot;ShantenWithGot&quot;)<br>data class [ShantenWithGot](-shanten-with-got/index.md)(val shantenNum: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html), val discardToAdvance: [Map](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)&lt;[Tile](../mahjongutils.models/-tile/index.md), [ShantenWithoutGot](-shanten-without-got/index.md)&gt;, val ankanToAdvance: [Map](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)&lt;[Tile](../mahjongutils.models/-tile/index.md), [ShantenWithoutGot](-shanten-without-got/index.md)&gt; = emptyMap()) : [CommonShanten](-common-shanten/index.md)<br>摸牌的手牌的向听信息 |
| [ShantenWithoutGot](-shanten-without-got/index.md) | [common]<br>@Serializable<br>@SerialName(value = &quot;ShantenWithoutGot&quot;)<br>data class [ShantenWithoutGot](-shanten-without-got/index.md)(val shantenNum: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html), val advance: [Set](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)&lt;[Tile](../mahjongutils.models/-tile/index.md)&gt;, val advanceNum: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 0, val goodShapeAdvance: [Set](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)&lt;[Tile](../mahjongutils.models/-tile/index.md)&gt;? = if (shantenNum == 1) emptySet() else null, val goodShapeAdvanceNum: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)? = if (shantenNum == 1) 0 else null, val improvement: [Map](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)&lt;[Tile](../mahjongutils.models/-tile/index.md), [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[Improvement](-improvement/index.md)&gt;&gt;? = if (shantenNum == 0) emptyMap() else null, val improvementNum: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)? = if (shantenNum == 0) 0 else null, val goodShapeImprovement: [Map](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)&lt;[Tile](../mahjongutils.models/-tile/index.md), [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[Improvement](-improvement/index.md)&gt;&gt;? = if (shantenNum == 0) emptyMap() else null, val goodShapeImprovementNum: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)? = if (shantenNum == 0) 0 else null) : [CommonShanten](-common-shanten/index.md)<br>未摸牌的手牌的向听信息 |
| [UnionShantenResult](-union-shanten-result/index.md) | [common]<br>@Serializable<br>@SerialName(value = &quot;UnionShantenResult&quot;)<br>data class [UnionShantenResult](-union-shanten-result/index.md)(val hand: [Hand](../mahjongutils.models.hand/-hand/index.md)&lt;[CommonHandPattern](../mahjongutils.models.hand/-common-hand-pattern/index.md)&gt;, val shantenInfo: [CommonShanten](-common-shanten/index.md), val regular: [RegularShantenResult](-regular-shanten-result/index.md), val chitoi: [ChitoiShantenResult](-chitoi-shanten-result/index.md)? = null, val kokushi: [KokushiShantenResult](-kokushi-shanten-result/index.md)? = null) : [CommonShantenResult](-common-shanten-result/index.md)&lt;[CommonHandPattern](../mahjongutils.models.hand/-common-hand-pattern/index.md)&gt; |

## Properties

| Name | Summary |
|---|---|
| [asWithGot](as-with-got.md) | [common]<br>val [CommonShanten](-common-shanten/index.md).[asWithGot](as-with-got.md): [ShantenWithGot](-shanten-with-got/index.md) |
| [asWithoutGot](as-without-got.md) | [common]<br>val [CommonShanten](-common-shanten/index.md).[asWithoutGot](as-without-got.md): [ShantenWithoutGot](-shanten-without-got/index.md) |

## Functions

| Name | Summary |
|---|---|
| [chitoiShanten](chitoi-shanten.md) | [common]<br>fun [chitoiShanten](chitoi-shanten.md)(tiles: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[Tile](../mahjongutils.models/-tile/index.md)&gt;, bestShantenOnly: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = false): [ChitoiShantenResult](-chitoi-shanten-result/index.md)<br>七对子向听分析 |
| [furoChanceShanten](furo-chance-shanten.md) | [common]<br>fun [furoChanceShanten](furo-chance-shanten.md)(tiles: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[Tile](../mahjongutils.models/-tile/index.md)&gt;, chanceTile: [Tile](../mahjongutils.models/-tile/index.md), allowChi: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = true, bestShantenOnly: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = false, allowKuikae: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = false): [FuroChanceShantenResult](-furo-chance-shanten-result/index.md)<br>副露判断向听分析 |
| [kokushiShanten](kokushi-shanten.md) | [common]<br>fun [kokushiShanten](kokushi-shanten.md)(tiles: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[Tile](../mahjongutils.models/-tile/index.md)&gt;, bestShantenOnly: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = false): [KokushiShantenResult](-kokushi-shanten-result/index.md)<br>国士无双向听分析 |
| [regularShanten](regular-shanten.md) | [common]<br>fun [regularShanten](regular-shanten.md)(tiles: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[Tile](../mahjongutils.models/-tile/index.md)&gt;, furo: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[Furo](../mahjongutils.models/-furo/index.md)&gt; = listOf(), bestShantenOnly: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = false): [RegularShantenResult](-regular-shanten-result/index.md)<br>标准形向听分析 |
| [shanten](shanten.md) | [common]<br>fun [shanten](shanten.md)(tiles: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[Tile](../mahjongutils.models/-tile/index.md)&gt;, furo: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[Furo](../mahjongutils.models/-furo/index.md)&gt; = emptyList(), bestShantenOnly: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = false): [UnionShantenResult](-union-shanten-result/index.md)<br>向听分析 |
