Commit Graph

15 Commits

Author SHA1 Message Date
Brian Fertig b6d85e30be feat: improve Go Fish AI with card sprites and turn exclusions
- Add custom card texture spritesheet and render cards using sprite frames
- Prevent AI from repeatedly asking for the same rank after a failed catch
- Track and exclude previously attempted (target, rank) pairs per turn to reduce redundant moves
- Load gofish-cards assets in preload scene
2026-05-30 19:28:48 -06:00
Brian Fertig 307f3b7123 feat(games): implement configurable match size for Go Fish and enhance Nerts UI
- Go Fish: Add support for 2-card and 4-card match variants.
  - Update `GoFishGame` and `GoFishLogic` to use a configurable `matchSize` (default 4).
  - Add UI toggle in `OpponentSelectScene` to select match variant.
  - Update labels and logic to reflect 'Books' (4-card) vs 'Pairs' (2-card).
- Nerts: Improve AI and UI responsiveness.
  - Add 'Last Move' timer panel with Shuffle (60s) and Resign (90s) buttons.
  - Implement foundation cooldowns to prevent rapid-fire AI moves.
  - Add dynamic layout for foundations and opponent panels based on player count.
  - Show opponent Nerts, stock, and waste cards in opponent panels.
  - Add `reshuffleAllStocks` utility in `NertsLogic`.
2026-05-24 11:02:06 -06:00
Brian Fertig 8a801b0f05 feat: add animated emotion feedback to opponent portraits
Introduces pulsing box-shadow animations to opponent portraits to provide visual feedback during gameplay. Opponents now display "happy" (green pulse) or "upset" (red pulse) emotions in response to specific game actions across Go Fish, Phase 10, and Skip Bo. Includes new video assets for Victor and updated sprite sheets.
2026-05-20 21:11:06 -06:00
Brian Fertig cc6544f44e feat(gofish): add matches panel and refill animations
- Add a "Matches so far" panel to the HUD that tracks paired ranks and remaining matches.
- Introduce `animateRefill` to visually animate cards flying from the pool to an empty hand.
- Refactor turn flow to use `playRefillsThenFinish` for sequential refill animations after pairing or empty-hand draws.
- Update `GoFishLogic` to capture refill events in `lastAsk.refills` for the animation system.
2026-05-20 19:27:11 -06:00
Brian Fertig fcee81a9d6 feat: enhance GoFish and Parchisi game UX with initial pair animations and pawn movement hints
- GoFish: Display animated banners when players are dealt starting pairs at the beginning of the game.
- Parchisi: Add pulsing glow and expanding ripple visual cues to indicate movable pawns.
- Parchisi: Implement click-outside dismissal for pawn selection highlights to improve interaction clarity.
2026-05-20 18:57:58 -06:00
Brian Fertig cc75ff1862 fix: correct Go Fish card animation positioning and face-up state
- Use existing card sprites for target hand animations to prevent duplicates
- Respect `handFaceUp` layout setting when flipping target cards
- Calculate precise destination coordinates for drawn cards based on hand axis and index
- Simplify `animateFishDraw` signature to accept explicit destination coordinates
- Fix tween completion logic to properly trigger callbacks
2026-05-19 18:17:37 -06:00
Brian Fertig 27c13a57d4 Animation improvements 2026-05-19 18:07:03 -06:00
Brian Fertig 975ee6ea25 refactor: fix card visibility and animation sequence in GoFish
- Pass live sprites from `animateAsk` to `animatePairedCards` to prevent premature destruction.
- Update `animateAsk` to fan collected cards into the asker's show zone instead of hiding them.
- Update `animatePairedCards` to accept pre-existing sprites for seamless pair animation.
- Remove `canAsk` check in `applyAsk` to ensure turn advances correctly after any ask.
2026-05-18 23:56:59 -06:00
Brian Fertig b63bf1b651 refactor: enhance GoFish ask animation with fishing line effect
Refactor the ask sequence in GoFishGame.js to introduce a visual fishing line
animation between the asker and target before revealing the result.

Key changes:
- Extract target slot/layout calculations outside conditional blocks for clarity.
- Add `animateFishingLine` method to draw a dynamic hook arc with barb that
  extends from asker to target over 1 second.
- Reorganize animation timing: reveal asker's card first, then cast fishing line,
  then handle catch/fail outcomes.
- Simplify catch/fail logic by unifying post-line animation flows.
- Improve visual feedback with staggered card appearances and smoother transitions.
2026-05-18 23:40:26 -06:00
Brian Fertig 55ff4a3e00 feat(gofish): reveal drawn card to local player during go-fish
When the local player picks a card from the scattered pool, the card is now flipped face-up in place for 700ms before flying to their hand. This provides visual feedback on the drawn card. AI draws remain hidden and fly directly to the hand.
2026-05-18 23:31:45 -06:00
Brian Fertig 4364181041 feat(gofish): implement interactive scattered pool for go-fish draws
Replace the static deck pile with a scattered pool of face-down cards in the center of the table. When a player goes fishing, the game now pauses in a 'pick' phase, allowing the local player to click a card or the AI to randomly select one. This adds visual variety and interactive gameplay to the go-fish mechanic.
2026-05-18 23:27:51 -06:00
Brian Fertig 9469440122 Additional Animations 2026-05-18 23:09:06 -06:00
Brian Fertig 53db492c83 feat(gofish): add animated card dealing and pair collection effects
- Implement round-robin card dealing animation from the pool to player hands.
- Add visual feedback for collecting pairs with card placement animations.
- Integrate fireworks particle effects when new pairs are formed.
- Update game logic to track paired cards for animation purposes.
- Improve game flow with staggered animations and delayed state updates.
2026-05-18 22:58:10 -06:00
Brian Fertig dcb8503219 refactor GoFishGame: align portrait/chip positions and add status text background 2026-05-18 22:32:19 -06:00
Brian Fertig d46de05b48 feat: add Go Fish card game with AI and UI
- Implement Go Fish game logic in GoFishLogic.js with state management, turn handling, and pair scoring
- Create GoFishAI.js with memory-based opponent that tracks card distribution and makes strategic decisions
- Build GoFishGame.js scene with Phaser UI including card rendering, seat layouts, animations, and game flow
- Register Go Fish in gameRegistry with 'cards' category and multiplayer support (1-4 players)
- Update GameMenuScene to display 'Cards' column for card games
- Wire up GoFishGame in GameRoomScene slug dispatch and main.js scene registry
2026-05-17 20:56:40 -06:00