fix: FRO-29 Websocket Communication (#7)

Reviewed-on: #7
Co-authored-by: Janis <janis.e.20@gmx.de>
Co-committed-by: Janis <janis.e.20@gmx.de>
This commit is contained in:
2025-12-10 09:43:28 +01:00
committed by Janis
parent 696c33b25a
commit 64d528bf5c
4 changed files with 385 additions and 0 deletions

47
src/types/GameSubTypes.ts Normal file
View File

@@ -0,0 +1,47 @@
type Card = {
identifier: string
path: string
idx: number | null
}
type Hand = {
cards: Card[]
}
type Player = {
id: string
name: string
dogLife: string
}
type PlayerQueue = {
currentPlayer: Player | null
players: Player[]
}
type PodiumPlayer = {
player: Player
position: number
roundsWon: number
tricksWon: number
}
type Round = {
trumpSuit: Card
firstRound: boolean
trickList: Trick[]
}
type Trick = {
cards: { [player: string]: Card }
firstCard: Card | null
winner: Player | null
}
type User = {
id: string
username: string
host: boolean
}
export type { Card, Hand, Player, PlayerQueue, PodiumPlayer, Round, Trick, User }