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/GameTypes.ts Normal file
View File

@@ -0,0 +1,47 @@
import type {
Hand,
Player,
PlayerQueue,
PodiumPlayer,
Round,
Trick,
User
} from "@/types/GameSubTypes.ts";
type GameInfo = {
gameId: string
self: Player | null
hand: Hand | null
playerQueue: PlayerQueue
currentTrick: Trick | null
currentRound: Round | null
}
type LobbyInfo = {
gameId: string
users: User[]
self: User
maxPlayers: number
}
type TieInfo = {
gameId: string
currentPlayer: Player | null
self: Player | null
tiedPlayers: Player[]
highestAmount: number
}
type TrumpInfo = {
gameId: string
chooser: Player | null
self: Player | null
selfHand: Hand | null
}
type WonInfo = {
gameId: string
winner: PodiumPlayer | null
allPlayers: PodiumPlayer[]
}