import type { SpecialCardType } from "./cards" type PlayerAction = { initiatingPlayerId: string } & ( | { type: "hit" } | { type: "stay" } | { type: "use-special" cardType: SpecialCardType } ) type ServerAction = { initiatingPlayerId?: never } & ( | { type: "start" targetSum: number players: Array<{ id: string name: string }> } | { type: "deal-number" toPlayerId: string number: number isCovert: boolean } | { type: "deal-special" toPlayerId: string cardType: SpecialCardType } | { type: "end" winnerIds: string[] cardsByPlayerId: Record // without redactions } ) export type GameAction = { index: number } & (PlayerAction | ServerAction)