Commit Graph

15 Commits

Author SHA1 Message Date
randrews 79832ed818 Add help modal and back button to score entry pages
HelpModal component shows game setup and scoring rules in a scrollable
overlay, triggered by a ? button top-right on Player Setup and Enter
Scores. Enter Scores also gets a ← back button top-left that returns
to the scoresheet without saving. PageFrame gains a headerActionLeft
slot to support the left-side button.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 23:06:48 -05:00
randrews aa121bbcf3 Add per-round edit button to scoresheet
A ✎ button next to each round label opens the score entry form
pre-populated with that round's scores. Submitting replaces the round
in place instead of appending a new one.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 22:36:39 -05:00
randrews 35c1694e18 Add sign toggle button for score entry and email to title screen
Replaces type="number" with type="text" + inputMode="numeric" so iOS
shows the numpad. A +/− toggle button beside each field handles the
sign; it is a no-op when the field is empty. Also adds contact email
below the title on the title screen.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 22:27:10 -05:00
randrews 9c1bbae359 Replace placeholder icons with custom image and fix PWA manifest colors
Regenerated all icons (favicon, apple-touch-icon, pwa-192, pwa-512) from
manual-icon.png using ImageMagick. Updated manifest and meta theme-color
from black to the app's blue (#a8d5e8), and added start_url to the manifest.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 22:11:26 -05:00
randrews e5fa0ae66f Add game-over state and pre-populate names on new game
Highlights the winning player's column in green when the game ends,
changes the footer button to "New Game" (reusing the existing confirm
dialog), and pre-populates player names from the previous game when
starting a new one.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 21:52:10 -05:00
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