diff --git a/src/components/game/layout/GameHeader.tsx b/src/components/game/layout/GameHeader.tsx deleted file mode 100755 index e989e75..0000000 --- a/src/components/game/layout/GameHeader.tsx +++ /dev/null @@ -1,78 +0,0 @@ -'use client'; - -import { Button } from '@/components/ui/button'; -import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'; -import { Pause, Play } from 'lucide-react'; -import { useGameContext } from '../GameContext'; -import { formatTime } from '../types'; -import { MAX_DAY, INCURSION_START_DAY } from '@/lib/game/constants'; -import { fmt } from '@/lib/game/stores'; - -export function GameHeader() { - const { store } = useGameContext(); - - // Calendar rendering - const renderCalendar = () => { - const days: React.ReactElement[] = []; - for (let d = 1; d <= MAX_DAY; d++) { - let dayClass = 'w-7 h-7 rounded text-xs flex items-center justify-center font-mono border transition-all '; - - if (d < store.day) { - dayClass += 'bg-blue-900/30 border-blue-800/50 text-blue-400'; - } else if (d === store.day) { - dayClass += 'bg-blue-600/40 border-blue-500 text-blue-300 shadow-lg shadow-blue-500/30'; - } else { - dayClass += 'bg-gray-800/30 border-gray-700/50 text-gray-500'; - } - - if (d >= INCURSION_START_DAY) { - dayClass += ' border-red-600/50'; - } - - days.push( - - -
{d}
-
- -

Day {d}

- {d >= INCURSION_START_DAY &&

Incursion Active

} -
-
- ); - } - return days; - }; - - return ( -
-
-

MANA LOOP

- -
-
-
Day {store.day}
-
{formatTime(store.hour)}
-
- -
-
{fmt(store.insight)}
-
Insight
-
- - -
-
- - {/* Calendar */} -
{renderCalendar()}
-
- ); -} diff --git a/src/components/game/layout/GameSidebar.tsx b/src/components/game/layout/GameSidebar.tsx deleted file mode 100755 index c804891..0000000 --- a/src/components/game/layout/GameSidebar.tsx +++ /dev/null @@ -1,141 +0,0 @@ -'use client'; - -import { useState, useEffect, useCallback } from 'react'; -import { Button } from '@/components/ui/button'; -import { Progress } from '@/components/ui/progress'; -import { Card, CardContent } from '@/components/ui/card'; -import { Zap, Sparkles, Swords, BookOpen, FlaskConical, type LucideIcon } from 'lucide-react'; -import { useGameContext } from '../GameContext'; -import { fmt, fmtDec } from '@/lib/game/stores'; -import type { GameAction } from '@/lib/game/types'; - -export function GameSidebar() { - const { - store, - maxMana, - clickMana, - effectiveRegen, - meditationMultiplier, - floorElemDef, - } = useGameContext(); - - const [isGathering, setIsGathering] = useState(false); - - // Auto-gather while holding - useEffect(() => { - if (!isGathering) return; - - let lastGatherTime = 0; - const minGatherInterval = 100; - let animationFrameId: number; - - const gatherLoop = (timestamp: number) => { - if (timestamp - lastGatherTime >= minGatherInterval) { - store.gatherMana(); - lastGatherTime = timestamp; - } - animationFrameId = requestAnimationFrame(gatherLoop); - }; - - animationFrameId = requestAnimationFrame(gatherLoop); - return () => cancelAnimationFrame(animationFrameId); - }, [isGathering, store]); - - const handleGatherStart = useCallback(() => { - setIsGathering(true); - store.gatherMana(); - }, [store]); - - const handleGatherEnd = useCallback(() => { - setIsGathering(false); - }, []); - - // Action buttons - const actions: { id: GameAction; label: string; icon: LucideIcon }[] = [ - { id: 'meditate', label: 'Meditate', icon: Sparkles }, - { id: 'climb', label: 'Climb', icon: Swords }, - { id: 'study', label: 'Study', icon: BookOpen }, - { id: 'convert', label: 'Convert', icon: FlaskConical }, - ]; - - return ( - - ); -} diff --git a/src/components/game/shared/GameOverScreen.tsx b/src/components/game/shared/GameOverScreen.tsx deleted file mode 100755 index 9d37b97..0000000 --- a/src/components/game/shared/GameOverScreen.tsx +++ /dev/null @@ -1,76 +0,0 @@ -'use client'; - -import { useState } from 'react'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; -import { Button } from '@/components/ui/button'; -import { useGameContext } from '../GameContext'; -import { fmt } from '@/lib/game/stores'; -import { MemorySlotPicker } from './MemorySlotPicker'; - -export function GameOverScreen() { - const { store } = useGameContext(); - const [memoriesConfirmed, setMemoriesConfirmed] = useState(false); - - if (!store.gameOver) return null; - - const handleStartNewLoop = () => { - store.startNewLoop(); - }; - - return ( -
-
- - - - {store.victory ? '🏆 VICTORY!' : '⏰ LOOP ENDS'} - - - -

- {store.victory - ? 'The Awakened One falls! Your power echoes through eternity.' - : 'The time loop resets... but you remember.'} -

- -
-
-
{fmt(store.loopInsight)}
-
Insight Gained
-
-
-
{store.maxFloorReached}
-
Best Floor
-
-
-
{store.signedPacts.length}
-
Pacts Signed
-
-
-
{store.loopCount + 1}
-
Total Loops
-
-
-
-
- - {/* Memory Slot Picker */} - {store.memorySlots > 0 && !memoriesConfirmed && ( - setMemoriesConfirmed(true)} /> - )} - - -
-
- ); -}