- Add vitest.config.js with jsdom environment and global test APIs
- Install vitest and jsdom as dev dependencies
- Add test scripts (test, test:run) to package.json
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Archive and finalize v1.0 milestone and planning artifacts: add MILESTONES.md, milestone archives (v1.0-ROADMAP.md, v1.0-REQUIREMENTS.md), verification and phase artifacts, and update phase/roadmap/project state to mark v1.0 MVP as shipped. Tidy PROJECT and ROADMAP to reflect shipped features and next steps, remove the old REQUIREMENTS.md (moved to milestone archive), and update STATE.md to show milestone completion. Minor code change: expose GridManager.events as public readonly to allow external subscribers. Package metadata: normalize keywords formatting and add an optional dependency entry in package.json for rollup native binary support.
Bug: Game was listening on its own events emitter for 'tilesSelected'
but GridManager emits on its own events emitter.
Fix: Changed listener from this.events to this.gridManager.events
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Enhanced setupCanvas() with viewport-based scaling
- Scale down only, never scales up
- CSS transform for display scaling (preserves coordinates
- Added comprehensive test coverage for responsive scaling behavior
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Enhanced setupCanvas() with viewport-based scaling
- Scale down only on scales to fit viewport on mobile devices
- CSS transform for display scaling (preserves coordinate mapping
- Added comprehensive test coverage for responsive scaling
- Verified coordinate mapping works correctly with CSS transform
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- MatchAnimation class with easeOutBack easing for satisfying pop effect
- scale+fade transforms in renderTile()
- CONFIG.animation.matchDuration = 250ms
- All tests passing
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Created 06-02-SUMMARY.md with accomplishments, deviations, and metrics
- Updated STATE.md with plan completion and decisions
- Updated ROADMAP.md progress (3/4 summaries complete)
- Marked UX-01 requirement complete
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add animateMatch() method to start animations for matched tiles
- Apply scale/alpha transforms in renderTile() when animation exists
- Clean up completed animations from matchAnimations map
- Add tests for animateMatch integration
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add animation.matchDuration=250 to CONFIG
- Add matchAnimations Map and animateMatch method to Renderer
- Apply scale+alpha transforms in renderTile for animating tiles
- Wire animateMatch call in Game.ts after drawPath
This completes the dependency from plan 06-01 (Rule 2 auto-fix for missing critical functionality)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add shadowBlur=15 and shadowColor='#00ff00' for green glow
- Wrap path drawing in ctx.save()/ctx.restore() for state preservation
- Add tests for glow effect properties (shadowBlur, shadowColor, save/restore)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- SUMMARY.md with RippleAnimation implementation details
- STATE.md updated with Phase 6 position and decisions
- ROADMAP.md updated with plan progress
- REQUIREMENTS.md: UX-02 marked complete
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add renderer.addRipple(x, y) call in handleInput method
- Ripple appears at touch/click coordinates before tile selection
- Provides visual feedback for all input interactions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 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
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add touch-action: none to canvas to prevent zoom/scroll
- Add overflow: hidden to body to prevent page scroll
- Mobile touch gestures now properly blocked during gameplay
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Update project planning and implement game-end components: tweak .gitignore entries, bump planning state progress, and add extensive Phase 04 artifacts (plans, summary, research, validation) plus Phase 05 initial plan. Deliverables include index.html overlay for game-over UI and modifications to src/game/Game.ts and src/models/Tile.ts to support win / no-moves detection and restart hooks; also add GameStateManager / NoMovesDetector integration notes and tests scaffolding in planning docs. Purpose: prepare and record implementation details for win/lose detection, game-over overlay, input blocking, reset/restart flow, and board-generation recovery.
- Created SUMMARY.md with execution results
- Updated ROADMAP.md with plan progress
- Updated STATE.md with position and decisions, and session info
Co-Authored-By: Claude <noreply@anthropic.com>
- Add board:generated event to GameEvents interface
- implement generateRandomGrid() method with solvability verification
- Enhance initializeGrid() to use NoMovesDetector for verification
- Add tests for random board generation
- add import for NoMovesDetector
Co-Authored-By: Claude <noreply@anthropic.com>
- shuffleTiles() redistributes tile types while preserving positions
- Clears selection to prevent stale tile references
- Emits board:shuffling before and board:shuffled after
- Handles partially cleared boards correctly
- Added comprehensive test coverage for shuffle functionality
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added restart button click event listener in Game constructor
- Click handler calls restart() method to reset game
- Null check for restart button element (defensive programming)
- Tests verify click handler registration and restart() invocation
- Tests verify graceful handling of missing button element
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added previousScore property to Game class
- Implemented restart() method that stores previousScore, resets grid/score/state/UI
- Added updatePreviousScoreDisplay() helper method
- Added game:restart event type to GameEvents interface
- Restart resets grid via initializeGrid(), resets score to 0, transitions state to IDLE
- Previous score preserved and displayed, hidden if 0
- All tests passing for restart functionality
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added tests for previous-score-display element existence and styling
- Added previous-score-display div to HTML with score-container wrapper
- Element initially hidden with display: none
- Follows existing score-display pattern for consistency
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Created 04-02-SUMMARY.md with implementation details
- NoMovesDetector with type-optimized algorithm (94% reduction in PathFinder calls)
- Game over overlay HTML with semi-transparent styling
- GameStateManager.reset() method (already implemented in 04-01)
- Updated STATE.md with progress and decisions
- Updated ROADMAP.md with phase 4 progress
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added game-over-overlay div with fixed positioning and z-index 1000
- Added overlay-content div with semi-transparent background
- Added game-over-message h1 element for win/lose message
- Added restart-button button with hover effect
- Overlay hidden by default (display: none)
- Styling matches score overlay pattern
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Created comprehensive test suite with 10 test cases
- Tests cover valid/invalid move detection, type-optimization, edge cases
- Tests verify path detection with 0, 1, and 2 turns
- Tests verify cleared tiles are skipped and empty board handling
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add transition validation with validTransitions mapping
- Implement transitionTo() method with validation and event emission
- Add canSelectTile() helper method for input blocking
- Add reset() method for restart functionality
- Update tests to cover all state machine behavior (7 test cases)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
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>
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>