Commit Graph

10 Commits

Author SHA1 Message Date
randrews 9201273dc4 Implement enter scores page with per-field and round validation
Each player gets a number input; scores are validated individually
(divisible by 5, ≤ 110) and as a round (must sum to −110). Submit
stays disabled until all constraints pass. A running sum indicator
turns green when the round is valid. Submitting appends the round
to game state and persists it to localStorage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 21:25:21 -05:00
randrews 813d18e133 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>
2026-05-28 00:34:23 -05:00
randrews e0a6aed4cf Centralize duplicated card shell, press animation, and color tokens
Extract the rounded-card shell and button press animation into a shared
CSS module composed by PageFrame, TitleScreen, and all buttons, add color
tokens for repeated values, and load the saved game once on mount.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 00:23:36 -05:00
randrews 3b6bd6815d Document pages, data model, and design system in CLAUDE.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 00:06:46 -05:00
randrews 4f852d7902 Add player setup form with validation and field error highlighting
- Dynamic name fields (3–6 players) with add/remove controls
- Start button disabled until all names are non-blank and unique;
  uniqueness check normalizes internal whitespace so "Bob  Smith"
  and "Bob Smith" are treated as the same name
- Names passed to game state are edge-trimmed only, preserving
  internal spacing as the user typed it
- Failing fields highlighted with red border and light red background
- PrimaryButton gains disabled prop with faded/flat appearance;
  active press state suppressed when disabled
- All round buttons now use consistent shadow and translateY values

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 23:59:45 -05:00
randrews bb077b31a3 Ignore .idea directory
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 20:29:17 -05:00
randrews b3e7df9ba8 Add PageFrame, PrimaryButton, and shared layout for non-title pages
- PageFrame: parchment-background frame with title, diamond-rule divider,
  scrollable content area, and optional bottom-pinned footer slot
- PrimaryButton: shared full-width button (light blue, drop shadow, pressed
  state via translateY + shadow reduction) — used by TitleScreen and PlayerSetup
- Global button base in index.css ensures touch-friendly sizing everywhere
- TitleScreen consolidated to use PrimaryButton instead of its own button style

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 20:28:49 -05:00
randrews 3c9c101829 Style title screen with gradient, bordered frame, and New Game button
Gradient background spans the full window on body; the 1rem-inset frame
provides the black border and rounded corners as a transparent overlay.
"Black" and "7" are typographically separated, with "7" oversized.
New Game button is full-width, light blue, pinned to the bottom.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 20:13:02 -05:00
randrews 6f9a9bc5dc Add placeholder page flow with localStorage-backed navigation
Four screens (Title, Player Setup, Score Sheet, Enter Scores) wired together
via a simple useState state machine. Auto-resumes to Score Sheet if a game
exists in localStorage under the key 'currentGame'.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 20:02:59 -05:00
randrews a09e8dac7f Initialize Black 7 PWA with React, Vite, and app icons
Sets up Vite + React + TypeScript with vite-plugin-pwa for offline support.
Adds app icon (line-drawn 7 on black) in all required sizes with a generation script.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 19:30:46 -05:00