nerdware/packages/shared/src/blindtest.ts
AyoubBenziza 3f0cab8f5f feat: end-of-game track recap, no self-vote in who_added, festive home + icons
- game:end now carries the played blindtest tracks (title/artist/youtubeId/
  url/submittedByName); the end screen lists them as cards with a YouTube
  open link so players can recover/export the songs
- who_added vote no longer lets you pick yourself (filtered out)
- home page: animated halo, floating geek emojis, springy gradient title,
  hover/tap on buttons (Framer Motion) + Lucide icons
- lobby settings get Lucide icons (game type, quiz, blindtest mode, tracks,
  start)

Verified e2e: game:end includes the track list with links.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 16:04:14 +02:00

37 lines
1.1 KiB
TypeScript

// Types concrets de l'épreuve Blindtest, partagés client/serveur.
// L'audio est joué localement par chaque client mais piloté par le DJ (media:sync).
/** Payload diffusé au lancement d'une manche blindtest (round:start), SANS la réponse. */
export interface BlindtestRoundPayload {
trackId: string
youtubeId: string
}
/** Vérité révélée à tous (round:reveal → truth), inclut qui a soumis le titre. */
export interface BlindtestRevealTruth {
title: string
artist: string
youtubeId: string
submittedBy: string
submittedByName: string
}
/** Résultat d'un joueur sur la manche (détail selon le mode). */
export interface BlindtestPlayerResult {
titleCorrect?: boolean
artistCorrect?: boolean
guessedCorrect?: boolean
points: number
}
/** round:reveal → perPlayerResult : playerId → résultat. */
export type BlindtestPerPlayerResult = Record<string, BlindtestPlayerResult>
/** Titre récapitulé en fin de partie (export / récupération des liens). */
export interface BlindtestTrackInfo {
title: string
artist: string
youtubeId: string
url: string
submittedByName: string
}