typescript on both client and server with communication via socket.io

This commit is contained in:
Gavin McDonald
2025-04-09 11:28:35 -04:00
parent 9f2773f45d
commit 3c4b8cf56e
73 changed files with 1233 additions and 41 deletions

19
types/index.ts Normal file
View File

@@ -0,0 +1,19 @@
export interface CardImage {
id: string;
back: boolean;
face: boolean;
joker: boolean;
suit: 'Clubs' | 'Diamonds' | 'Hearts' | 'Spades' | null;
url: string;
}
export interface GameCard extends CardImage {
flipped: boolean;
}
export interface GameState {
id: string;
players: Set<string>;
cards: GameCard[];
lastUpdated: number;
}