Add React frontend and clean up legacy HTTP backend
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
export type CardColor = 'HEARTS' | 'LEAVES' | 'ACORNS' | 'BELLS';
|
||||
export type CardValue = 'C7' | 'C8' | 'C9' | 'C10' | 'LOWER' | 'UPPER' | 'KING' | 'ACE';
|
||||
|
||||
export interface Card {
|
||||
color: CardColor;
|
||||
value: CardValue;
|
||||
}
|
||||
|
||||
export interface PlayerInfo {
|
||||
order: number;
|
||||
name: string;
|
||||
connected: boolean;
|
||||
}
|
||||
|
||||
export interface MyPlayer {
|
||||
order: number;
|
||||
name: string;
|
||||
token: string;
|
||||
gid: string;
|
||||
}
|
||||
|
||||
export interface StashData {
|
||||
first_player: number;
|
||||
cards: Record<string, Card>;
|
||||
}
|
||||
|
||||
export interface GameStatusDetail {
|
||||
active_player?: number;
|
||||
active_round_guesses?: Record<string, number>;
|
||||
active_round_stashes?: number[];
|
||||
active_stash?: StashData;
|
||||
previous_stash?: StashData;
|
||||
standings: number[][][];
|
||||
}
|
||||
|
||||
export interface GameStatusPayload {
|
||||
gid: string;
|
||||
completed: boolean;
|
||||
players: PlayerInfo[];
|
||||
series_number: number;
|
||||
round_number: number;
|
||||
cards_in_round: number;
|
||||
status: GameStatusDetail;
|
||||
}
|
||||
|
||||
export interface GameInfo {
|
||||
gid: string;
|
||||
name: string;
|
||||
started: boolean;
|
||||
players: PlayerInfo[];
|
||||
}
|
||||
|
||||
export type Hand = Record<string, Card>;
|
||||
Reference in New Issue
Block a user