-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
31 lines (25 loc) · 786 Bytes
/
types.ts
File metadata and controls
31 lines (25 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
export type GameMode = 'BOARD' | 'MAP';
export interface Player {
id: string;
name: string;
roundScore: number; // Reset every round
roundWins: number; // Rounds won in current game
handicap: number;
isBot?: boolean;
botDifficulty?: 'easy' | 'medium' | 'hard';
}
export interface Brick {
id: number;
value: number;
isFlipped: boolean;
isGap: boolean;
isNew?: boolean;
}
export type GameStatus = 'LOBBY' | 'PLAYING' | 'ROUND_OVER' | 'GAME_OVER';
export type TurnPhase = 'FIRST_FLIP' | 'CHOOSING_ACTION' | 'SECOND_FLIP' | 'SCORING';
export interface ScoringResult {
pairs: Array<{ coords: number[]; points: number }>;
twins: Array<{ coords: number[]; points: number }>;
sequences: Array<{ coords: number[]; points: number }>;
totalPoints: number;
}