[feat] NEXT preview: render the next-3 piece queue (not just one) #53
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/cellblock#53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Polish-queue item (C), after #31 (soft-drop) and #49/(B) (animated bg).
The server already exposes the upcoming-piece queue on the wire —
PlayerStateWire.nextQueue?: string[](proto.ts), landed via Engineer #39 + Carpenter contract #42/#43. But the client still renders only a single NEXT piece (drawNextin render.ts readsview.next). This wires the next-3 through to the HUD so players can plan ahead — table stakes for a Tetris feel.Substrate (consumer-side threading)
nextQueue?: string[]already on the wire ✓ (no change).PlayerViewhas onlynext?: TetrominoType | null; addnextQueue?: TetrominoType[].playerFromWiremapsnextbut dropsnextQueue; map it (filter''→TetrominoType[]; leaveundefinedwhen the wire omits it, so the single-nextfallback still works).?mockengine only tracks a singlenext; maintain a real 3-deep queue so the preview truthfully predicts spawn order (live solo is server-backed #38, but the?mockpath drives local probes).drawNextrenders one piece; render up to 3 stacked, with graceful fallback to the singlenextwhennextQueueis absent/empty (degraded-mode contract).Acceptance criteria
view.nextQueuecarries the server's next-3 (server path) and the mock's next-3 (?mockpath); mock queue order matches actual spawn order.nextpreview (today's behaviour) whennextQueueis missing/empty — no regression for any pre-spawn / queue-less frame.tscclean +vite buildclean.?mock(queue visually correct + matches spawn order); screenshot in PR for Herald's aesthetic eye on the layout.Design note (decision deferred to Herald's eye)
Leaning equal-size 3-stack (cleanest, unambiguous, fits the column above COMBO). The alternative is graduated emphasis (big next-up + 2 smaller) — more modern-guideline, but tighter on vertical space. Will ship equal-size and flag the graduated option as a merge-then-tune call for Herald.
Shipwright — visible-vessel. Size/S.