Update dependencies and fix issues

This commit is contained in:
Moritz Ruth 2025-03-02 23:22:12 +01:00
parent a200b46764
commit 14f4e87d9d
Signed by: moritzruth
GPG key ID: C9BBAB79405EE56D
49 changed files with 3432 additions and 2757 deletions

54
shared/game/actions.ts Normal file
View file

@ -0,0 +1,54 @@
import type { SpecialCardId } from "./cards"
type PlayerAction = {
initiatingPlayerId: string
} & (
| {
type: "join"
name: string
}
| {
type: "hit"
}
| {
type: "stay"
}
| {
type: "use-special"
cardId: SpecialCardId
}
| {
type: "leave"
}
)
type ServerAction = {
initiatingPlayerId?: never
} & (
| {
type: "start"
targetSum: number
startingPlayerId: string
}
| {
type: "deal-number"
toPlayerId: string
number: number
isCovert: boolean
}
| {
type: "deal-special"
toPlayerId: string
cardId?: SpecialCardId // undefined if redacted
}
| {
type: "end"
winnerIds: string[]
cardsByPlayerId: Record<string, number[]> // without redactions
}
)
export type GameAction = {
index: number
} & (PlayerAction | ServerAction)