Root Cause: - GAMES_CONFIG used 'memory-lightning' as key but validator was registered as 'memory-quiz' - When rooms were created with gameName 'memory-lightning', getValidator() couldn't find the validator - This caused all move validations to fail, breaking configuration changes and guess validation Key Changes: 1. Fixed game identifier mismatch: - Changed GAMES_CONFIG key from 'memory-lightning' to 'memory-quiz' - Updated games/page.tsx to use 'memory-quiz' for routing 2. Completed Memory Quiz room-based multiplayer implementation: - Added MemoryQuizGameValidator with all 9 move types (START_QUIZ, NEXT_CARD, SHOW_INPUT_PHASE, ACCEPT_NUMBER, REJECT_NUMBER, SET_INPUT, SHOW_RESULTS, RESET_QUIZ, SET_CONFIG) - Created RoomMemoryQuizProvider for network-synchronized gameplay - Implemented optimistic client-side updates with server validation - Added proper serialization handling (send numbers instead of React components) - Split memory-quiz/page.tsx into modular components (SetupPhase, DisplayPhase, InputPhase, ResultsPhase) 3. Updated socket-server: - Fixed to use getValidator() instead of hardcoded matchingGameValidator - Added game-specific initial state handling for both 'matching' and 'memory-quiz' 4. Fixed test failures from arcade_sessions schema changes: - Updated arcade-session-validation.e2e.test.ts to create rooms before sessions (roomId is now primary key) - Added missing playerMetadata and playerHovers fields to arcade-session-integration.test.ts - Skipped obsolete test in orphaned-session-cleanup.test.ts (roomId can't be null as it's the primary key) 5. Code quality fixes: - Removed unused type imports from room-moderation.ts - Changed to optional chain in MemoryQuizGameValidator.ts - Removed unnecessary fragment in MemoryQuizGame.tsx Testing: - All modified tests updated to match new schema requirements - TypeScript errors resolved (excluding pre-existing @soroban/abacus-react issues) - Lint passes with 0 errors and 0 warnings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
0 lines
0 B
Plaintext
0 lines
0 B
Plaintext
The file is empty.