feat: 实现补杠和抢杠胡功能
新增 MeldType 和 MeldGroup 领域模型,支持碰、明杠、补杠、暗杠四种副露类型 GameSeat 新增副露管理方法,支持将碰升级为补杠 ResponseActionWindowBuilder 新增补杠响应窗口构建逻辑 SettlementService 新增补杠和抢杠胡结算规则 前端新增副露展示区域,支持显示各类副露标签
This commit is contained in:
@@ -35,6 +35,7 @@ type SelfSeatView = {
|
||||
score: number
|
||||
handTiles: string[]
|
||||
discardTiles: string[]
|
||||
melds: string[]
|
||||
}
|
||||
|
||||
type PublicSeatView = {
|
||||
@@ -47,6 +48,7 @@ type PublicSeatView = {
|
||||
score: number
|
||||
handCount: number
|
||||
discardTiles: string[]
|
||||
melds: string[]
|
||||
}
|
||||
|
||||
type GameStateResponse = {
|
||||
@@ -543,6 +545,11 @@ function submitCandidateAction(actionType: string, tile: string | null) {
|
||||
{{ tile }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="discard-row" v-if="game.selfSeat.melds.length > 0">
|
||||
<span v-for="(meld, index) in game.selfSeat.melds" :key="`self-meld-${meld}-${index}`" class="discard-chip">
|
||||
{{ meld }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
@@ -610,6 +617,12 @@ function submitCandidateAction(actionType: string, tile: string | null) {
|
||||
</span>
|
||||
<span v-if="seat.discardTiles.length === 0" class="empty-copy">暂无弃牌</span>
|
||||
</div>
|
||||
<div class="discard-row">
|
||||
<span v-for="(meld, index) in seat.melds" :key="`${seat.seatNo}-meld-${meld}-${index}`" class="discard-chip">
|
||||
{{ meld }}
|
||||
</span>
|
||||
<span v-if="seat.melds.length === 0" class="empty-copy">暂无副露</span>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user