import type {PlayerState} from "./playerState.ts";
import type {PendingClaimState} from "./pendingClaimState.ts";
import type {GamePhaseState} from "./gamePhaseState.ts";

export interface GameState {
    // 房间ID
    roomId: string
    // 当前阶段
    phase: GamePhaseState

    // 庄家位置
    dealerIndex: number

    // 当前操作玩家（座位）
    currentTurn: number

    // 玩家列表
    players: Record<string, PlayerState>

    // 剩余数量
    remainingTiles: number

    // 操作响应窗口（碰/杠/胡）
    pendingClaim?: PendingClaimState

    // 胡牌玩家
    winners: string[]

    // 分数（playerId -> score）
    scores: Record<string, number>
}