Commit all uncommitted files
This commit is contained in:
parent
8ecb23b7dc
commit
6fc0820831
14 changed files with 1347 additions and 2 deletions
44
src/types/index.ts
Normal file
44
src/types/index.ts
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
export interface Player {
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface Card {
|
||||
id: string;
|
||||
suit: 'Schellen' | 'Schilten' | 'Eicheln' | 'Rosen';
|
||||
value: number;
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
confidence: number;
|
||||
}
|
||||
|
||||
export interface Round {
|
||||
id: string;
|
||||
cards: Card[];
|
||||
piles: Record<string, string[]>; // player id -> card ids
|
||||
}
|
||||
|
||||
export interface Game {
|
||||
id: string;
|
||||
date: string;
|
||||
players: Player[];
|
||||
rounds: Round[];
|
||||
finalScores: Record<string, number>;
|
||||
}
|
||||
|
||||
export interface GameState {
|
||||
currentScreen: 'setup' | 'camera' | 'results' | 'history';
|
||||
players: Player[];
|
||||
cardValues: Record<'Schellen' | 'Schilten' | 'Eicheln' | 'Rosen', number>;
|
||||
currentRound: number;
|
||||
detectedCards: Card[];
|
||||
gameHistory: Game[];
|
||||
cameraStream: MediaStream | null;
|
||||
}
|
||||
|
||||
export interface DetectionResult {
|
||||
cards: Card[];
|
||||
error?: string;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue