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:
47
src/types/GameTypes.ts
Normal file
47
src/types/GameTypes.ts
Normal 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[]
|
||||
}
|
||||
Reference in New Issue
Block a user