Implement scoresheet page with scoring logic and confirmation dialog

- Add src/game/scoring.ts with computeRunningTotals and isGameOver
- Build ScoreSheet grid: player columns, per-round scores, running totals after round 2+
- Small red "New Game" button in header top-right with full-screen confirmation overlay
- Extend PageFrame with headerAction and overlay props
- Move press animation/shadow from .pressable class to global button selector

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-28 00:34:23 -05:00
parent e0a6aed4cf
commit 813d18e133
11 changed files with 237 additions and 24 deletions
+5 -1
View File
@@ -4,19 +4,23 @@ interface Props {
title: string
children: React.ReactNode
footer?: React.ReactNode
headerAction?: React.ReactNode
overlay?: React.ReactNode
}
export default function PageFrame({ title, children, footer }: Props) {
export default function PageFrame({ title, children, footer, headerAction, overlay }: Props) {
return (
<div className={styles.frame}>
<header className={styles.header}>
<h1 className={styles.title}>{title}</h1>
<div className={styles.rule} role="separator" />
{headerAction && <div className={styles.headerAction}>{headerAction}</div>}
</header>
<div className={styles.content}>
{children}
</div>
{footer && <div className={styles.footer}>{footer}</div>}
{overlay && <div className={styles.overlay}>{overlay}</div>}
</div>
)
}