Commit Graph

183 Commits

Author SHA1 Message Date
adlee-was-taken
c7fb85d281 Remove desktop 10px padding from game-screen on mobile
The desktop #game-screen.active had padding:10px that was never
overridden in the mobile portrait styles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:11:02 -05:00
adlee-was-taken
118912dd13 Add subtle dark gradient to mobile header for status bar visibility
Replaces background:none with a dark-to-transparent gradient so the
status message and mute button are visible against the green felt.
Reverts mute button circle in favor of the gradient approach.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:08:57 -05:00
adlee-was-taken
0e594a5e28 Add dark circle background behind mute button on mobile
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:06:08 -05:00
adlee-was-taken
a6ec72d72c Remove dark background from mobile header for flush appearance
The desktop game-header background was still showing on mobile,
creating a visible dark band with padding around the status bar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:05:18 -05:00
adlee-was-taken
e2f353d4ab Make mobile header flush with page edges and add spacing below
Remove left/right/top padding from notification bar so it spans edge
to edge, and increase bottom margin from 4px to 8px for more breathing
room before the opponents row.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:01:36 -05:00
adlee-was-taken
e601eb04c9 Add alpha notice banner to lobby screen
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:52:22 -05:00
adlee-was-taken
6c771810f7 Distribute space evenly between draw pile and player hand on mobile
Replace margin:auto on table-center with space-evenly on player-row
so the draw pile and player cards are equally spaced vertically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:50:55 -05:00
adlee-was-taken
dbad7037d1 Fix dealer chip and status bar clipping on mobile edges
Increase horizontal padding on game-table (4px to 10px) and header
(8px to 12px) to prevent edge clipping. Change opponents-row overflow
to visible so dealer chips aren't cut off.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:50:05 -05:00
adlee-was-taken
21362ba125 Fix pair chime not playing for local player's own swaps
The swap animation defers state updates to pendingGameState, which
bypassed checkForNewPairs entirely. Now pair detection runs when the
deferred state is applied after the swap animation completes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:47:43 -05:00
adlee-was-taken
2dcdaf2b49 Remove turns remaining counter from FINAL TURN badge
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:46:03 -05:00
adlee-was-taken
1fa13bbe3b Play pair sound before element check and add pair detection debug log
Sound was gated behind element check which may fail during swap
animation when card DOM elements are replaced by overlays.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:41:17 -05:00
adlee-was-taken
a76fd8da32 Hide bottom bar during scoresheet modal and compact mobile layout
Bottom bar is hidden when the hole results modal opens and restored
when dismissed. Also adds mobile-specific compact styles for the
scoresheet: smaller cards, tighter spacing, reduced padding.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:34:16 -05:00
adlee-was-taken
634d101f2c Play pair chime sound for all players including local player
firePairCelebration was only doing the visual animation but not playing
the pair sound. The sound was only played during score tallying.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:31:00 -05:00
adlee-was-taken
a1d8a127dc Add bottom margin to mobile player area for border breathing room
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:43:34 -05:00
adlee-was-taken
65b4af9831 Hide mobile bottom bar when drawer panels are open
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:38:14 -05:00
adlee-was-taken
8942238f9c Make mobile bottom bar flow in document instead of position fixed
Remove position:fixed from the bottom bar and make it a flex-shrink:0
child of the game screen flex column. This guarantees the game layout
gets exactly the remaining viewport height with no overlap, regardless
of how the browser calculates viewport units.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:35:09 -05:00
adlee-was-taken
7dc27fe882 Use window.innerHeight for mobile viewport height on Chrome Android
Set --app-height CSS custom property from window.innerHeight via JS,
which is the only reliable way to get the actual visible viewport on
Chrome Android. Falls back to 100vh if JS hasn't loaded.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:28:58 -05:00
adlee-was-taken
097f241c6f Fix Chrome Android viewport overflow with position fixed game screen
Use position:fixed with inset:0 for the game screen instead of
height-based sizing. This bypasses the Chrome Android 100vh bug where
vh includes space behind the dynamic URL bar. Also adds
-webkit-fill-available fallback on body.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:26:50 -05:00
adlee-was-taken
1c5d6b09e2 Fix Chrome Android player hand overlapping bottom bar
Add 100vh fallback before 100dvh, max-height constraints on every flex
container in the layout chain, and explicit flex-basis 0% to prevent
Chrome from letting flex children grow beyond viewport bounds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:22:07 -05:00
adlee-was-taken
889f8ce1cd Fix mobile opponents to fit 3 per row with calc-based flex-basis
Replaces fixed 120px width with calc((100% - 20px) / 3) so 3 opponents
always fit per row regardless of viewport width.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:14:43 -05:00
adlee-was-taken
b4e9390f16 Show both KNOCKED and LOW SCORE badges when knocker wins hole
Also fix opponent areas shifting between rows on mobile by giving them
a fixed 120px width so name/score changes don't cause reflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:54:18 -05:00
adlee-was-taken
94e2bdaaa7 Move player dealer chip to top-left corner on mobile
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:33:04 -05:00
adlee-was-taken
d322403764 Shrink and reposition player dealer chip on mobile
Reduces from 38px to 22px and pulls offset from -10px to -4px so it
no longer overlaps the bottom bar buttons.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:24:00 -05:00
adlee-was-taken
9c6ce255bd Fix mobile layout overflow into bottom bar
Add bottom padding to game-table to reserve space for the fixed bottom
bar, and overflow:hidden on player-row so content respects flex bounds.
Also centers draw pile with equal spacing and adds dealer chip clearance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:19:26 -05:00
adlee-was-taken
06d52a9d2c Add top padding to mobile lobby screen to clear auth bar from logo
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:10:39 -05:00
adlee-was-taken
76cbd4ae22 Increase mobile bottom bar button fonts by 40% and status message by 20%
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:08:20 -05:00
adlee-was-taken
9b04bc85c2 Fix mobile bottom bar pinning by scaling elements individually
Remove transform: scale(0.75) from the bar container which broke the
full-width layout and margin-auto pinning. Instead shrink font sizes
and padding on individual buttons and round info by ~25%.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:06:11 -05:00
adlee-was-taken
2ccbfc8120 Increase mobile portrait status message font to match player names
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:03:19 -05:00
adlee-was-taken
1678077c53 Raise mobile bottom bar z-index and shrink by 25%
Bumps z-index from 500 to 900 so the bottom bar stays above side panel
drawers (600) but below card animation overlays (1000). Scales the bar
to 75% in mobile portrait to reduce visual footprint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:01:46 -05:00
adlee-was-taken
0dbb2d13ed Shrink mobile player/deck cards and widen opponent hand spacing
Reduces card sizes from 72×101 to 64×90 on mobile portrait to prevent
overlap with bottom bar when opponents wrap to 2 rows. Increases
horizontal gap between opponent hands from 4px to 10px for better
readability of player chips.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 12:58:40 -05:00
adlee-was-taken
b81874f5ba Fix CSP blocking admin panel buttons by removing inline onclick handlers
Replace onclick attributes with data-action/data-id attributes and
use event delegation. CSP script-src 'self' blocks inline handlers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 23:56:45 -05:00
adlee-was-taken
797d1e0280 Add copy invite link button and auto-populate invite code from URL
Admin panel gets "Copy Link" button on active invites that copies
a signup URL with ?invite= param. Client auto-opens signup form
with invite code pre-filled when visiting that link.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 23:54:06 -05:00
adlee-was-taken
538ca51ba5 Add forgot/reset password UI and Resend email config
- Forgot password form in auth modal with email input
- Reset password form handles token from email link
- /reset-password route serves index.html for SPA
- EMAIL_FROM env var in docker-compose
- Success/error feedback for both flows

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 23:51:58 -05:00
adlee-was-taken
9339abe19c Pin Hole indicator left and End Game right in mobile bottom bar
- Hole indicator: margin-right auto, pill background, brighter text (0.9 opacity)
- End Game: margin-left auto, pinned to right edge
- Standings/Scores stay centered between them

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 23:43:02 -05:00
adlee-was-taken
ac2d53b404 Move Hole indicator and End Game button to mobile bottom bar
- Add round info and leave button to mobile-bottom-bar HTML
- Hide .round-info and #leave-game-btn from header on mobile
- Style round info as subtle text, leave button as red-tinted pill
- Slim down bottom bar: smaller gaps/padding to fit 4 items
- Sync round numbers and leave text via JS (renderGame + bindEvents)
- Frees up header space, reduces mobile crowding

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 23:40:24 -05:00
adlee-was-taken
7e108a71f9 Max out mobile opponent text sizes for readability
- Card rank/suit: 0.8rem -> 1.05rem with tight line-height 1.05
- Names: 0.75rem -> 0.85rem
- Showing score: 0.7rem -> 0.85rem
- Short screen cards: 0.6rem -> 0.8rem
- Fills the 35x49px cards without overflowing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 23:28:21 -05:00
adlee-was-taken
7642d120e2 Increase mobile opponent text sizes for readability
- Opponent card rank/suit: 0.65rem -> 0.8rem (25% bump)
- Opponent names (h4): 0.6rem -> 0.75rem
- Opponent showing score: 0.55rem -> 0.7rem
- Short screen card font: 0.5rem -> 0.6rem
- Animation overlay font (JS 12.25px) closely matches CSS (12.8px)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 23:26:14 -05:00
adlee-was-taken
6ba0639d51 Fix opponent row fitting 3 per row on mobile
- Remove excessive 44px bottom padding on game-table (was eating vertical space)
- Tighten opponents-row: reduce gap 6px->4px, side padding 8px->4px
- Reduce opponent-area side padding 5px->4px
- Allow opponent areas to shrink (remove flex-shrink: 0)
- 3 opponents now fit in ~367px, well within 412px Pixel 10 Pro

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 23:23:19 -05:00
adlee-was-taken
3b9522fec3 Fix mobile bottom bar: pin to viewport bottom, remove background
- Position fixed bottom:0 so buttons are always at the very bottom
- Remove dark background that was picking up the green felt color
- Add bottom padding to game-table so player cards aren't hidden behind bar

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 23:21:32 -05:00
adlee-was-taken
aa2093d6c8 Polish mobile bottom bar buttons and drawer transitions
- Redesign bottom bar buttons as pill-shaped with subtle glass border
- Active state: warm gradient fill with glow shadow
- Tap feedback: scale(0.95) press effect
- Drawer panels: iOS-style cubic-bezier spring curve, drop shadow
- Backdrop transition matches drawer timing
- Darker bottom bar background with softer border for depth

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 23:17:53 -05:00
adlee-was-taken
3227c92d63 Wrap opponent row at 3 per line and bump opponent card size 10%
- Change opponents-row from nowrap to flex-wrap: wrap (max 3+2 layout)
- Opponent cards: 32x45px -> 35x49px, font 0.6 -> 0.65rem
- Short screen: 26x36px -> 29x40px, font 0.45 -> 0.5rem
- 3 opponents at 35px fits 369px, well within 375px iPhone width

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 23:16:40 -05:00
adlee-was-taken
fb3bd53b0a Fix mobile animation card sizing and layout polish
- Fix animation overlay cards rendering at wrong size: base .card CSS
  (clamp 65px min) was overriding the inline dimensions set by JS.
  Add !important to .draw-anim-front/.draw-anim-back width/height: 100%
  so overlays always match their parent container size.
- Size opponent swap held card to match opponent card dimensions instead
  of defaulting to deck size (looked oversized on mobile)
- Shrink dealer chip on mobile (38px -> 20px) to fit opponent areas
- Make header more compact: smaller fonts, tighter gaps, nowrap on badges
- Bump deck/discard to 72x101px to match player card size on mobile
- Add spacing between header/opponents, and between deck area/player cards

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 23:11:39 -05:00
adlee-was-taken
4fcdf13f66 Fix mobile portrait layout: lobby overlap, deal animation, card font sizes
- Add renderGame() guard during deal animation to prevent DOM destruction
  mid-animation causing cards to pile up at wrong positions
- Push lobby content below fixed auth-bar (padding 15px -> 50px top)
- Scale player card font-size to 1.5rem/1.3rem for readable text on mobile
- Add full mobile portrait layout: bottom drawers, compact header, responsive
  card grid sizing, safe-area insets, and mobile detection via matchMedia
- Add cardFontSize() helper for consistent proportional font scaling
- Add mobile bottom bar with drawer toggles for standings/scores

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 22:52:44 -05:00
adlee-was-taken
62e7d4e1dd Fix End Game showing false 'Connection lost' error
Add _intentionalClose flag to suppress error when server closes
WebSocket after game_ended broadcast. Clean transition to lobby.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 20:39:43 -05:00
adlee-was-taken
bae5d8da3c Wire authManager into GolfGame instance for WebSocket token auth
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 20:32:49 -05:00
adlee-was-taken
bda88d8218 Add gap between login and signup buttons
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 20:27:29 -05:00
adlee-was-taken
f68d0bc26d v3.1.0: Invite-gated auth, Glicko-2 ratings, matchmaking queue
- Enforce invite codes on registration (INVITE_ONLY=true by default)
- Bootstrap admin account for first-time setup
- Require authentication for WebSocket connections and room creation
- Add Glicko-2 rating system with multiplayer pairwise comparisons
- Add Redis-backed matchmaking queue with expanding rating window
- Auto-start matched games with standard rules after countdown
- Add "Find Game" button and matchmaking UI to client
- Add rating column to leaderboard
- Scale down docker-compose.prod.yml for 512MB droplet

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 20:02:10 -05:00
adlee-was-taken
c59c1e28e2 Smooth held card transition and scale font with card size
Remove scale(1.15) size jump on held card, keep gold border/glow highlight.
Set animation card font-size proportionally to card width so text matches
across deck, hand, and opponent card sizes. Animate font-size during swaps
so text scales smoothly as cards travel between different-sized positions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 00:14:27 -05:00
adlee-was-taken
850b8d6abf Standard-rules-only leaderboard with client unranked indicators
Only standard-rules games now count toward leaderboard stats. Games
with any house rule variant are marked "Unranked" in the active rules
bar, and a notice appears in the lobby when house rules are selected.
Also fixes game_logger duplicate options dicts (now uses dataclasses.asdict,
capturing all options including previously missing ones) and refactors
duplicated achievement-checking logic into shared helpers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 11:16:45 -05:00
adlee-was-taken
e1cca98b8b Fix client scoring to respect house rules for column pairs
Client-side scoring (points badge and score tally animation) ignored
house rules that modify pair behavior. Extract shared
calculateColumnScores() helper that mirrors server logic for
eagle_eye, negative_pairs_keep_value, wolfpack, four_of_a_kind,
and one_eyed_jacks rules. Server now sends scoring_rules flags
in game state.

Also fix opponent flip animation card font-size matching.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 10:34:40 -05:00
adlee-was-taken
df61d88ec6 Revise rules page strategic impact descriptions for accuracy
Rename "New Variants" to "Game Variants", fix descriptions that
contradicted game mechanics (impossible card scenarios, misleading
value assessments), and clarify Underdog Bonus catch-up intent.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 10:18:26 -05:00
adlee-was-taken
9fc6b83bba v3.0.0: V3 features, server refactoring, and documentation overhaul
- Extract WebSocket handlers from main.py into handlers.py
- Add V3 feature docs (dealer rotation, dealing animation, round end reveal,
  column pair celebration, final turn urgency, opponent thinking, score tallying,
  card hover/selection, knock early drama, column pair indicator, swap animation
  improvements, draw source distinction, card value tooltips, active rules context,
  discard pile history, realistic card sounds)
- Add V3 refactoring docs (ai.py, main.py/game.py, misc improvements)
- Add installation guide with Docker, systemd, and nginx setup
- Add helper scripts (install.sh, dev-server.sh, docker-build.sh)
- Add animation flow diagrams documentation
- Add test files for handlers, rooms, and V3 features
- Add e2e test specs for V3 features
- Update README with complete project structure and current tech stack
- Update CLAUDE.md with full architecture tree and server layer descriptions
- Update .env.example to reflect PostgreSQL (remove SQLite references)
- Update .gitignore to exclude virtualenv files, .claude/, and .db files
- Remove tracked virtualenv files (bin/, lib64, pyvenv.cfg)
- Remove obsolete game_log.py (SQLite) and games.db

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 10:03:45 -05:00
adlee-was-taken
8431cd6fd1 Speed up score animations and fix end-of-round UI
- Cut reveal/tally/celebration timings by ~50% for snappier round end
- Add dealAnimationInProgress flag to suppress flip prompts during deal
- Stop deck/discard pulse animation when round ends
- Update CLAUDE.md with animation race condition documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 08:45:44 -05:00
adlee-was-taken
c615c8b433 Fix animation race conditions and improve UI feedback
- Fix discard pile "do-si-do" race condition when CPU draws from discard
- Add isDrawAnimating flag for opponent draw animations
- Skip STEP 2 (discard detection) when draw from discard detected
- Fix deal animation using wrong rect (was using whole player area)
- Add player area highlight when it's their turn (green glow)
- Clear opponent animation flags when your_turn message received
- Hide discard pile during draw-from-discard animation
- Add comprehensive debug logging for animation flags

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 00:28:06 -05:00
adlee-was-taken
a5d108f4f2 Add animation system documentation and project context
- client/ANIMATIONS.md: Full documentation of the CardAnimations API, timing config, CSS rules, and common patterns
- CLAUDE.md: Project context for AI assistants with architecture overview and development guidelines

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:14:04 -05:00
adlee-was-taken
df422907b0 Speed up animations and reduce CPU turn delays
- Reduce move animation durations by 40% for snappier card movement
- Widen and slow down turn indicator shake for better visibility
- Cut CPU turn delays significantly:
  - Pre-turn pause: 0.6s → 0.25s
  - Initial look: 0.6-0.9s → 0.3-0.5s
  - Post-draw settle: 0.9s → 0.5s
  - Post-draw consider: 0.6-0.9s → 0.3-0.6s
  - Post-action pause: 0.6-0.9s → 0.3-0.5s

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:06:17 -05:00
adlee-was-taken
bc1b1b7725 Migrate animation system to unified anime.js framework
- Replace CSS transitions with anime.js for all card animations
- Create card-animations.js as single source for all animation logic
- Remove draw-animations.js (merged into card-animations.js)
- Strip CSS transitions from card elements to prevent conflicts
- Fix held card appearing before draw animation completes
- Make opponent/CPU animations match local player behavior
- Add subtle shake effect for turn indicator (replaces brightness pulse)
- Speed up flip animations by 30% for snappier feel
- Remove unnecessary pulse effects after draws/swaps

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:57:53 -05:00
adlee-was-taken
7b64b8c17c Timing and animation changes for a more natural feeling game with CPU opps.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 12:22:54 -05:00
Aaron D. Lee
6950769bc3 Version 2.0.0: Animation fixes, timing improvements, and E2E test suite
Animation fixes:
- Fix held card positioning bug (was appearing at bottom of page)
- Fix discard pile blank/white flash on turn transitions
- Fix blank card at round end by skipping animations during round_over/game_over
- Set card content before triggering flip animation to prevent flash
- Center suit symbol on 10 cards

Timing improvements:
- Reduce post-discard delay from 700ms to 500ms
- Reduce post-swap delay from 1800ms to 1000ms
- Speed up swap flip animation from 1150ms to 550ms
- Reduce CPU initial thinking delay from 150-250ms to 80-150ms
- Pause now happens after swap completes (showing result) instead of before

E2E test suite:
- Add Playwright-based test bot that plays full games
- State parser extracts game state from DOM for validation
- AI brain ports decision logic for automated play
- Freeze detector monitors for UI hangs
- Visual validator checks CSS states
- Full game, stress, and visual test specs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 18:33:28 -05:00
Aaron D. Lee
15135c404e Add "Put Back" button to cancel accidental discard draws
When you accidentally click the discard pile, you can now put the card
back instead of being forced to swap. The "Put Back" button appears
only when you've drawn from the discard pile.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 19:02:25 -05:00
Aaron D. Lee
0c8d2b4a9c Add share link button for room invites
- Add 🔗 button next to room code copy button
- Copies full URL with ?room=XXXX parameter
- On page load, pre-fills room code from URL param
- Works with both logged-in users and guests
- Cleans up URL after extracting room code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 17:59:52 -05:00
Aaron D. Lee
0b0873350c Move room code banner to top-left corner
Fixes overlap between room code and logout button (auth bar) which
are both positioned in the top-right corner.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 16:28:57 -05:00
Aaron D. Lee
1dbfb3f14b Home page auth button logic fixed - for better enjoyment of logo animation.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 12:53:44 -05:00
Aaron D. Lee
ba85a11d1a Refine golf ball logo and add static route
- Adjust dimple size and spacing for balanced appearance
- Enlarge card suit symbols (font-size 32) in single row
- Fine-tune symbol positioning and spacing
- Increase margin between logo and golfer emoji
- Add /golfball-logo.svg static file route

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 12:51:10 -05:00
Aaron D. Lee
d2e78da7d2 Add golf ball logo with card suits and fix server shutdown hang
- Add SVG golf ball logo with dimples and card suit symbols (♣♦♠♥)
- Place logo to the left of the golfer emoji in header
- Fix server shutdown hanging by removing custom signal handlers
  that intercepted SIGINT/SIGTERM without triggering uvicorn shutdown

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 12:31:21 -05:00
Aaron D. Lee
bea85e6b28 Huge v2 uplift, now deployable with real user management and tooling!
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 11:32:15 -05:00
Aaron D. Lee
c912a56c2d Early Knock house rule and improved error handling.
- Add Early Knock variant: flip all remaining cards (≤2) to go out early
- Update RULES.md with comprehensive documentation for all new variants
- Shorten flip mode dropdown descriptions for cleaner UI
- Add try-catch and optional chaining in startGame() for robustness
- Add WebSocket connection error feedback with reject sound
- AI awareness for Early Knock decisions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 22:23:12 -05:00
Aaron D. Lee
36a71799b5 UI polish: opponent draw flash, compact house rules with suit separators, toast styling.
- Opponent draw highlight: scale + outline flash animation
- House rules reorganized: Gameplay, Jokers, Card Values, Bonuses & Penalties
- Compact inline rule descriptions with alternating suit separators (♣♦♠♥)
- Wolfpack + Four of a Kind combo note when both selected
- Toast notifications now yellow/green with charcoal text
- Brief pause after AI draw for visual feedback

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 21:37:02 -05:00
Aaron D. Lee
33e3f124ed Additional house rules to accomodate more common game variants.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:13:30 -05:00
Aaron D. Lee
23657f6b0c More host UI refinements, fun logo animations, etc. 2026-01-26 17:03:30 -05:00
Aaron D. Lee
c72fe44cfa More host UI refinements, intuitive UI enhancements during gameplay pt 3. 2026-01-26 15:04:23 -05:00
Aaron D. Lee
059edfb3d9 More host UI refinements, intuitive UI enhancements during gameplay pt 2. 2026-01-26 15:02:25 -05:00
Aaron D. Lee
13a490b417 More host UI refinements, intuitive UI enhancements during gameplay. 2026-01-26 15:01:49 -05:00
Aaron D. Lee
67021b2b51 Additional flip on discard variant - endgame and updated rules.md and new rules page. 2026-01-26 01:01:08 -05:00
Aaron D. Lee
e9909fa967 More UI tweaks and fixes. 2026-01-26 00:24:57 -05:00
Aaron D. Lee
0f44464c4f Additional animation work and AI strategy enhancements and logging for performance analytics. 2026-01-25 18:49:18 -05:00
Aaron D. Lee
f80bab3b4b Numerous WebUI animations, improvements, AI fixes, opporitunity cost-based decision logic, etc. 2026-01-25 17:37:01 -05:00
Aaron D. Lee
d9073f862c Add documentation and move rules display to header
- Add comprehensive docstrings to game.py, room.py, constants.py
- Document all classes, methods, and module-level items
- Move active rules display into game header as inline column
- Update header to 5-column grid layout
- Update joker mode descriptions (Lucky Swing, Eagle-Eye)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 00:10:26 -05:00
Aaron D. Lee
39b78a2ba6 Add final results modal, active rules display, and UI improvements
- Add big final results modal at game end with rankings and share button
- Add active rules bar showing enabled variants during gameplay
- Increase spacing between player cards and opponents row
- Add Wolfpack bonus rule (2 pairs of Jacks = -5 pts)
- Change joker options to radio buttons (None/Standard/Lucky Swing/Eagle-Eye)
- Update Eagle-Eye jokers: +2 pts unpaired, -4 pts paired
- Add card flip animation on discard pile
- Redesign waiting room layout with side-by-side columns
- Style card backs with red Bee-style diamond crosshatch pattern
- Compact standings panel to show top 4 per category
- Various CSS polish and responsive improvements

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 23:53:07 -05:00
Aaron D. Lee
f4275c7a7d Refactor card values to single source of truth, fix ten_penny bug
- Add constants.py as the single source of truth for card values
- Derive RANK_VALUES from DEFAULT_CARD_VALUES instead of duplicating
- Add centralized get_card_value() function in game.py for Card objects
- Add get_card_value_for_rank() in constants.py for string-based lookups
- Fix bug: AI ten_penny returned 0 instead of 1 per RULES.md
- Update ai.py and game_analyzer.py to use centralized functions
- UI improvements for client

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 20:26:17 -05:00
Aaron D. Lee
94da51e46b Update client UI with latest styling changes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 19:30:20 -05:00
Aaron D. Lee
ac84a76c3d Update client UI with latest changes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 19:30:13 -05:00
Aaron D. Lee
d18cea2104 Initial commit: 6-Card Golf with AI opponents
Features:
- Multiplayer WebSocket game server (FastAPI)
- 8 AI personalities with distinct play styles
- 15+ house rule variants
- SQLite game logging for AI analysis
- Comprehensive test suite (80+ tests)

AI improvements:
- Fixed Maya bug (taking bad cards, discarding good ones)
- Personality traits influence style without overriding competence
- Zero blunders detected in 1000+ game simulations

Testing infrastructure:
- Game rules verification (test_game.py)
- AI decision analysis (game_analyzer.py)
- Score distribution analysis (score_analysis.py)
- House rules testing (test_house_rules.py)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 19:30:13 -05:00