import React, { useState } from 'react'; import { CheckCircle, Circle, Star, Zap, Trophy, Play } from 'lucide-react'; const BedroomCleaningGame = () => { const [completedTasks, setCompletedTasks] = useState(new Set()); const [currentLevel, setCurrentLevel] = useState(1); const [points, setPoints] = useState(0); const [activeTimer, setActiveTimer] = useState(false); const [timeLeft, setTimeLeft] = useState(0); const levels = [ { name: "Quick Wins", color: "bg-green-100 border-green-300", tasks: [ { id: 1, task: "Make the bed", points: 10, time: 3 }, { id: 2, task: "Put dirty clothes in hamper", points: 5, time: 2 }, { id: 3, task: "Throw away any obvious trash", points: 5, time: 2 }, { id: 4, task: "Put away 3 items that have homes", points: 5, time: 3 } ] }, { name: "Surface Clearing", color: "bg-blue-100 border-blue-300", tasks: [ { id: 5, task: "Clear nightstand completely", points: 15, time: 5 }, { id: 6, task: "Clear dresser top", points: 15, time: 5 }, { id: 7, task: "Pick up floor items (just pick up!)", points: 10, time: 4 }, { id: 8, task: "Deal with 'the chair' (you know the one)", points: 20, time: 7 } ] }, { name: "Deep Organize", color: "bg-purple-100 border-purple-300", tasks: [ { id: 9, task: "Sort items into keep/donate/trash piles", points: 25, time: 10 }, { id: 10, task: "Organize one drawer completely", points: 20, time: 8 }, { id: 11, task: "Put all books/magazines in their spots", points: 15, time: 6 }, { id: 12, task: "Wipe down all surfaces", points: 15, time: 5 } ] } ]; const toggleTask = (taskId, taskPoints) => { const newCompleted = new Set(completedTasks); if (completedTasks.has(taskId)) { newCompleted.delete(taskId); setPoints(points - taskPoints); } else { newCompleted.add(taskId); setPoints(points + taskPoints); } setCompletedTasks(newCompleted); }; const startTimer = (minutes) => { setActiveTimer(true); setTimeLeft(minutes * 60); const timer = setInterval(() => { setTimeLeft(prev => { if (prev <= 1) { clearInterval(timer); setActiveTimer(false); return 0; } return prev - 1; }); }, 1000); }; const formatTime = (seconds) => { const mins = Math.floor(seconds / 60); const secs = seconds % 60; return `${mins}:${secs.toString().padStart(2, '0')}`; }; const getMotivationalMessage = () => { const messages = [ "You're doing great! 🌟", "Look at you go! 💪", "Crushing it! ⚡", "You're unstoppable! 🚀", "Amazing progress! ✨" ]; return messages[Math.floor(Math.random() * messages.length)]; }; const levelProgress = levels.map(level => { const levelTasks = level.tasks.length; const completedLevelTasks = level.tasks.filter(task => completedTasks.has(task.id)).length; return completedLevelTasks / levelTasks; }); const totalTasks = levels.reduce((sum, level) => sum + level.tasks.length, 0); const totalCompleted = completedTasks.size; const overallProgress = (totalCompleted / totalTasks) * 100; return (

Bedroom Cleaning Quest

{points} points
{totalCompleted}/{totalTasks} tasks
{activeTimer && (
{formatTime(timeLeft)}
)}

{Math.round(overallProgress)}% Complete

{overallProgress === 100 && (

🎉 QUEST COMPLETE! 🎉

You've conquered your bedroom! Time to celebrate! 🎊

)}
{levels.map((level, levelIndex) => (

Level {levelIndex + 1}: {level.name}

{level.tasks.map((task) => (
{task.task}
{task.points} pts
))}
))}

💡 ADHD-Friendly Tips:

{points > 0 && (

{getMotivationalMessage()}

)}
); }; export default BedroomCleaningGame;