59 lines
1.2 KiB
TypeScript
59 lines
1.2 KiB
TypeScript
export type Position = "GK" | "DEF" | "MID" | "WING" | "ST";
|
|
|
|
export type Difficulty = "easy" | "medium" | "hard";
|
|
|
|
export type Feedback = "correct" | "partial" | "wrong" | "empty";
|
|
|
|
export type Player = {
|
|
id: string;
|
|
name: string;
|
|
position: Position;
|
|
nationality: string;
|
|
club: string;
|
|
league: string;
|
|
formerClubs?: string[];
|
|
championsLeagueTitles?: number;
|
|
leagueTitles?: number;
|
|
leagueTitleCountries?: string[];
|
|
};
|
|
|
|
export type Puzzle = {
|
|
id: string;
|
|
date: string;
|
|
difficulty: Difficulty;
|
|
solution: Record<Position, string>;
|
|
fixedPosition: Position;
|
|
clues: string[];
|
|
};
|
|
|
|
export type SlotGuess = {
|
|
position: Position;
|
|
playerId: string | null;
|
|
feedback: Feedback;
|
|
};
|
|
|
|
export type Guess = {
|
|
slots: SlotGuess[];
|
|
};
|
|
|
|
export type PuzzleProgress = {
|
|
attempts: Guess[];
|
|
elapsedSeconds: number;
|
|
solved: boolean;
|
|
locked: boolean;
|
|
};
|
|
|
|
export type DailyProgress = Record<Difficulty, PuzzleProgress>;
|
|
|
|
export type GlobalStats = {
|
|
averageSeconds: number;
|
|
bestSeconds: number | null;
|
|
currentStreak: number;
|
|
gamesPlayed: number;
|
|
lastCompletedDate: string | null;
|
|
maxStreak: number;
|
|
perfectDays: number;
|
|
totalSeconds: number;
|
|
winDistribution: Record<number, number>;
|
|
};
|