add actual results schema, prediction points to leaderboard and game state

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 22:12:41 +01:00
parent 8372769c9b
commit 00e17d1f28

View File

@@ -37,6 +37,17 @@ export const predictionSchema = z.object({
export type Prediction = z.infer<typeof predictionSchema>
// ─── Actual Results ─────────────────────────────────────────────────
export const actualResultsSchema = z.object({
winner: z.string(),
second: z.string(),
third: z.string(),
last: z.string(),
})
export type ActualResults = z.infer<typeof actualResultsSchema>
// ─── Jury Voting ────────────────────────────────────────────────────
export const juryRoundSchema = z.object({
@@ -83,6 +94,7 @@ export const leaderboardEntrySchema = z.object({
displayName: z.string(),
juryPoints: z.number(),
bingoPoints: z.number(),
predictionPoints: z.number(),
totalPoints: z.number(),
})
@@ -105,6 +117,7 @@ export const gameStateSchema = z.object({
playerId: z.string(),
displayName: z.string(),
})),
actualResults: actualResultsSchema.nullable(),
// Leaderboard
leaderboard: z.array(leaderboardEntrySchema),
})