Commit Graph

4 Commits

Author SHA1 Message Date
Claude Code d660e09703 feat(06-03): add RippleAnimation class for touch feedback
- Add RippleAnimation class with 300ms duration and 40px max radius
- Add rippleAnimations property to Renderer
- Add addRipple(x, y) method to trigger ripple effect
- Render ripples in main render loop with auto-cleanup
- Use selection color (rgba 233, 69, 96) for visual consistency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 13:40:52 +00:00
tiennm99 99cbdbedc0 docs(phase-3): add planning artifacts and update state for Phase 4
Add Phase 3 plan files (pathfinding, scoring, visual feedback),
update state tracking for Phase 4 context, and clean up gitignore.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:04:38 +07:00
tiennm99 4836b92d40 docs(phase-3): complete Core Matching Mechanics phase and prepare Phase 4
Mark Phase 3 as completed in roadmap, add verification documentation,
and create Phase 4 context for Game State Management.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:03:31 +07:00
Claude Code e93ef9cb80 feat(02-02): implement Renderer class with tile and selection rendering
- Created Renderer class with tile rendering, selection highlighting, and fade-in animations
- Created GridManager class with tile array and selection state management (blocking dependency)
- Added tilesSelected event to GameEvents interface
- Created comprehensive test suite for Renderer with 9 test cases

**Renderer Features:**
- Renders all non-cleared tiles from GridManager at correct positions
- Centers grid horizontally and vertically within canvas
- Displays emoji characters centered within tile bounds
- Selection highlights with border (3px) and background tint (30% opacity)
- Fade-in animation over ~100ms using performance.now()
- Uses CONFIG.tile.size, gap, cornerRadius for positioning
- Respects CONFIG.colors for styling

**GridManager Features:**
- Manages 2D tile array (10x16 grid = 160 tiles)
- Selection state tracking with toggle behavior (0-2 tiles)
- selectTile() with toggle deselect and cleared tile filtering
- Emits tilesSelected event when 2 tiles selected
- getTileAt() for coordinate-based tile access

**Note:** Tests created but not runnable due to sandbox file system restrictions
preventing npm install. Implementation verified manually against plan requirements.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-11 02:51:11 +00:00