add quiz components to leaderboard, route views
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,7 @@ export function Leaderboard({ entries, resultsEntered }: LeaderboardProps) {
|
||||
<span title="Prediction points">P:{resultsEntered ? entry.predictionPoints : "?"}</span>
|
||||
<span title="Jury points">J:{entry.juryPoints}</span>
|
||||
<span title="Bingo points">B:{entry.bingoPoints}</span>
|
||||
<span title="Quiz points">Q:{entry.quizPoints}</span>
|
||||
<span className="text-sm font-bold text-foreground">{entry.totalPoints}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -39,6 +40,7 @@ export function Leaderboard({ entries, resultsEntered }: LeaderboardProps) {
|
||||
<li><strong>P</strong> = Prediction points — 25 for correct winner, 10 each for 2nd/3rd, 15 for last place</li>
|
||||
<li><strong>J</strong> = Jury points — rate each act 1-12, earn up to 5 pts per round for matching the group consensus</li>
|
||||
<li><strong>B</strong> = Bingo points — 2 pts per tapped trope + 10 bonus for a full bingo line</li>
|
||||
<li><strong>Q</strong> = Quiz points — 5 easy, 10 medium, 15 hard</li>
|
||||
</ul>
|
||||
</div>
|
||||
</CardContent>
|
||||
|
||||
@@ -6,6 +6,7 @@ import { PlayerList } from "@/components/player-list"
|
||||
import { JuryDisplay } from "@/components/jury-display"
|
||||
import { BingoDisplay } from "@/components/bingo-display"
|
||||
import { Leaderboard } from "@/components/leaderboard"
|
||||
import { QuizDisplay } from "@/components/quiz-display"
|
||||
import { RoomHeader } from "@/components/room-header"
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
|
||||
@@ -57,6 +58,9 @@ function DisplayView() {
|
||||
{room.currentAct === "scoring" && gameState && (
|
||||
<div className="flex flex-col items-center gap-8">
|
||||
<p className="text-2xl text-muted-foreground">Scoring</p>
|
||||
{gameState.currentQuizQuestion && (
|
||||
<QuizDisplay question={gameState.currentQuizQuestion} />
|
||||
)}
|
||||
{gameState?.actualResults && (
|
||||
<Card>
|
||||
<CardHeader>
|
||||
|
||||
@@ -7,6 +7,8 @@ import { JuryHost } from "@/components/jury-host"
|
||||
import { JuryVoting } from "@/components/jury-voting"
|
||||
import { BingoCard } from "@/components/bingo-card"
|
||||
import { ActualResultsForm } from "@/components/actual-results-form"
|
||||
import { QuizHost } from "@/components/quiz-host"
|
||||
import { QuizBuzzer } from "@/components/quiz-buzzer"
|
||||
import { Leaderboard } from "@/components/leaderboard"
|
||||
import { RoomHeader } from "@/components/room-header"
|
||||
import { Button } from "@/components/ui/button"
|
||||
@@ -117,6 +119,14 @@ function HostView() {
|
||||
/>
|
||||
)}
|
||||
|
||||
{gameState && room.currentAct === "scoring" && gameState.currentQuizQuestion && (
|
||||
<QuizBuzzer
|
||||
question={gameState.currentQuizQuestion}
|
||||
buzzStatus={gameState.myQuizBuzzStatus}
|
||||
onBuzz={() => send({ type: "buzz" })}
|
||||
/>
|
||||
)}
|
||||
|
||||
{gameState && (room.currentAct === "scoring" || room.currentAct === "ended") && (
|
||||
<Leaderboard entries={gameState.leaderboard} resultsEntered={!!gameState.actualResults} />
|
||||
)}
|
||||
@@ -181,6 +191,14 @@ function HostView() {
|
||||
onCloseVote={() => send({ type: "close_jury_vote" })}
|
||||
/>
|
||||
)}
|
||||
{gameState && room.currentAct === "scoring" && (
|
||||
<QuizHost
|
||||
question={gameState.currentQuizQuestion}
|
||||
onStartQuestion={() => send({ type: "start_quiz_question" })}
|
||||
onJudge={(correct) => send({ type: "judge_quiz_answer", correct })}
|
||||
onSkip={() => send({ type: "skip_quiz_question" })}
|
||||
/>
|
||||
)}
|
||||
{gameState && (room.currentAct === "scoring" || room.currentAct === "ended") && (
|
||||
<ActualResultsForm
|
||||
entries={gameState.lineup.entries}
|
||||
|
||||
@@ -7,6 +7,7 @@ import { PredictionsForm } from "@/components/predictions-form"
|
||||
import { JuryVoting } from "@/components/jury-voting"
|
||||
import { BingoCard } from "@/components/bingo-card"
|
||||
import { Leaderboard } from "@/components/leaderboard"
|
||||
import { QuizBuzzer } from "@/components/quiz-buzzer"
|
||||
import { RoomHeader } from "@/components/room-header"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Input } from "@/components/ui/input"
|
||||
@@ -144,6 +145,14 @@ function PlayerView() {
|
||||
/>
|
||||
)}
|
||||
|
||||
{gameState && room.currentAct === "scoring" && gameState.currentQuizQuestion && (
|
||||
<QuizBuzzer
|
||||
question={gameState.currentQuizQuestion}
|
||||
buzzStatus={gameState.myQuizBuzzStatus}
|
||||
onBuzz={() => send({ type: "buzz" })}
|
||||
/>
|
||||
)}
|
||||
|
||||
{gameState && room.currentAct === "scoring" && (
|
||||
<Leaderboard entries={gameState.leaderboard} resultsEntered={!!gameState?.actualResults} />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user