refactor(matching): remove legacy battle-arena references
Remove duplicate game entries by cleaning up legacy GAMES_CONFIG references. Matching game now accessed exclusively through game registry. - Removed battle-arena from GAMES_CONFIG - Removed battle-arena from GAME_TYPE_TO_NAME mapping - Removed battle-arena navigation logic Fixes duplicate game entries in game selector. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -9,8 +9,8 @@ import { css } from '../../../../styled-system/css'
|
||||
import { getAllGames, getGame, hasGame } from '@/lib/arcade/game-registry'
|
||||
|
||||
// Map GameType keys to internal game names
|
||||
// Note: "battle-arena" removed - now handled by game registry as "matching"
|
||||
const GAME_TYPE_TO_NAME: Record<GameType, string> = {
|
||||
'battle-arena': 'matching',
|
||||
'complement-race': 'complement-race',
|
||||
'master-organizer': 'master-organizer',
|
||||
}
|
||||
|
||||
@@ -20,11 +20,10 @@ function GamesPageContent() {
|
||||
|
||||
const _handleGameClick = (gameType: string) => {
|
||||
// Navigate directly to games using the centralized game mode with Next.js router
|
||||
// Note: battle-arena has been removed - now handled by game registry as "matching"
|
||||
console.log('🔄 GamesPage: Navigating with Next.js router (no page reload)')
|
||||
if (gameType === 'memory-quiz') {
|
||||
router.push('/games/memory-quiz')
|
||||
} else if (gameType === 'battle-arena') {
|
||||
router.push('/games/matching')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,22 +7,8 @@ import { getAllGames } from '../lib/arcade/game-registry'
|
||||
import { GameCard } from './GameCard'
|
||||
|
||||
// Game configuration defining player limits
|
||||
// Note: "matching" (formerly "battle-arena") has been migrated to the modular game system
|
||||
export const GAMES_CONFIG = {
|
||||
'battle-arena': {
|
||||
name: 'Matching Pairs Battle',
|
||||
fullName: 'Matching Pairs Battle ⚔️',
|
||||
maxPlayers: 4,
|
||||
description: 'Multiplayer memory battle with friends',
|
||||
longDescription:
|
||||
'Battle friends in epic memory challenges. Match pairs faster than your opponents in this exciting multiplayer experience.',
|
||||
url: '/arcade/matching',
|
||||
icon: '⚔️',
|
||||
chips: ['👥 Multiplayer', '🎯 Strategic', '🏆 Competitive'],
|
||||
color: 'purple',
|
||||
gradient: 'linear-gradient(135deg, #e9d5ff, #ddd6fe)',
|
||||
borderColor: 'purple.200',
|
||||
difficulty: 'Intermediate',
|
||||
},
|
||||
'complement-race': {
|
||||
name: 'Speed Complement Race',
|
||||
fullName: 'Speed Complement Race 🏁',
|
||||
|
||||
Reference in New Issue
Block a user