Add step counter for opens

Add a per-player counter showing boxes opened next to Alice and Bob's names (format x/100, starting at 0). Integrates with existing PresentsPuzzle flow by updating UI to display aliceOpened.size and bobOpened.size as counters alongside names, reflecting progress as boxes are opened.

X-Lovable-Edit-ID: edt-0898b52f-a2aa-466c-a315-141301ce3db6
This commit is contained in:
gpt-engineer-app[bot] 2025-11-19 03:29:31 +00:00
commit 652ee82849

View file

@ -163,7 +163,9 @@ const PresentsPuzzle = ({
const renderGrid = (title: string, openedBoxes: Set<number>, found: number, color: string) => { const renderGrid = (title: string, openedBoxes: Set<number>, found: number, color: string) => {
return <div className="space-y-3"> return <div className="space-y-3">
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<h3 className="font-semibold text-lg">{title}</h3> <h3 className="font-semibold text-lg">
{title} <span className="text-sm text-muted-foreground">({openedBoxes.size}/100)</span>
</h3>
<Badge variant="secondary" className="text-sm"> <Badge variant="secondary" className="text-sm">
<Gift className="w-3 h-3 mr-1" /> <Gift className="w-3 h-3 mr-1" />
{found}/26 {found}/26