import React, { useState } from 'react'; import { Lock, CheckCircle, XCircle, MapPin, FileText, Newspaper, MessageCircle, Eye } from 'lucide-react'; const BuckauCrimesGame = () => { const [gameState, setGameState] = useState({ isPaid: false, currentLocation: 0, locationProgress: [ { revealed: true, riddlesSolved: 0, qrScanned: false }, { revealed: false, riddlesSolved: 0, qrScanned: false }, { revealed: false, riddlesSolved: 0, qrScanned: false }, { revealed: false, riddlesSolved: 0, qrScanned: false }, { revealed: false, riddlesSolved: 0, qrScanned: false } ], collectedClues: [], gameCompleted: false, finalAnswers: { suspect: '', weapon: '', motive: '' } }); const locations = [ { id: 0, name: "Thiemplatz", qrCode: "QR-THIEM-2025", icon: "🎆", description: "Der Tatort. Silvester 2024.", storyInfo: "Du stehst am Thiemplatz. Hier wurde Basti tot aufgefunden.", newspaper: { title: "SILVESTERFEIER AM THIEMPLATZ", date: "31. Dezember 2024", content: "Buckau feiert ins neue Jahr! Heute Abend grĂ¶ĂŸte Silvesterparty des Stadtteils." }, riddles: [ { question: "Zettel mit Zahlen: '2-18-5-23-3-11-1-21'. Alphabet-Positionen. Welches Wort?", answer: "BREWCKAU", hint: "B=2, R=18, E=5...", clue: "Basti hatte 'BREWCKAU' bei sich - sein zweites Zuhause." }, { question: "Feuerzeug mit: 'FĂŒr die besten Bohnen'. Buchstaben R-E-P-P-I sortieren?", answer: "PIPPER", hint: "CafĂ© in Buckau", clue: "Feuerzeug vom Pipper CafĂ©." }, { question: "Fußspuren zu Ort ohne Stillstand. TagsĂŒber Menschen, Wochenende Tanzende?", answer: "BAHNHOF", hint: "FrĂŒher fĂŒr Reisende, heute Kulturzentrum", clue: "Jemand floh Richtung Bahnhof." } ], nextLocationId: 1 }, { id: 1, name: "Buckauer Bahnhof", qrCode: "QR-BAHNHOF-2025", icon: "🚉", description: "Kulturzentrum. Verlassen.", storyInfo: "Am Bahnhof. Kalt und verlassen.", whatsapp: { title: "Maren ↔ Basti", messages: [ { sender: "Maren", time: "23:30", text: "Treffen 23:45 am Bahnhof?" }, { sender: "Basti", time: "23:32", text: "Warum nicht im Brewckau?" }, { sender: "Maren", time: "23:33", text: "Muss dir erst was zeigen." } ] }, riddles: [ { question: "Kreide: 'TREFFEN 23:45'. Zahlen '16-9-16-16-5-18'. Welches Wort?", answer: "PIPPER", hint: "P=16, I=9...", clue: "23:45 Uhr, Treffen mit Person aus Pipper." }, { question: "Fahrkarte: '13-1-18-5-14'. Alphabet. Welcher Name?", answer: "MAREN", hint: "M=13, A=1...", clue: "Maren war hier." }, { question: "Zeitung: 'K-L-O-S-T-E-R-B-E-R-G-S-T-R'. Welche Straße?", answer: "KLOSTERBERGSTRASSE", hint: "Buchstaben zusammen", clue: "Treffen an Klosterbergstraße geplant." } ], nextLocationId: 2 }, { id: 2, name: "Pipper CafĂ©", qrCode: "QR-PIPPER-2025", icon: "☕", description: "CafĂ©. Nervöse Stimmung.", storyInfo: "Im Pipper. Maren wirkt nervös.", newspaper: { title: "TRAGISCHER VERLUST", date: "15. MĂ€rz 2022", content: "Lucas Koslowski (28) verstorben. Schwester Maren tief getroffen." }, whatsapp: { title: "Marens Status", messages: [ { sender: "Maren", time: "15. MĂ€rz 2022", text: "Lucas ist tot. Niemand war fĂŒr ihn da." } ] }, riddles: [ { question: "Apothekenrezept: 'As₂O₃'. Welches Element?", answer: "ARSEN", hint: "As = Arsen", clue: "Jemand hatte Zugang zu Arsen!" }, { question: "Foto 'FĂŒr Lucas, 2022'. Chefin-Initialen M.K. Welcher Vorname?", answer: "MAREN", hint: "M = weiblicher Vorname", clue: "Maren Koslowski, Lucas' Schwester." }, { question: "GĂ€stebuch: 'ITÄPS'. RĂŒckwĂ€rts?", answer: "SPÄTI", hint: "Von hinten lesen", clue: "Maren war beim SpĂ€ti." } ], nextLocationId: 3 }, { id: 3, name: "SpĂ€ti", qrCode: "QR-SPAETI-2025", icon: "đŸȘ", description: "SpĂ€ti an der Ecke.", storyInfo: "Beim SpĂ€ti. Besitzer erzĂ€hlt von vermummter Person.", whatsapp: { title: "Maren ↔ ???", messages: [ { sender: "Maren", time: "23:28", text: "Beim SpĂ€ti. Gleich vorbei." }, { sender: "???", time: "23:29", text: "Bist du sicher?" }, { sender: "Maren", time: "23:30", text: "Er hat Lucas im Stich gelassen." } ] }, riddles: [ { question: "Kassenbon 23:30: Wodka, Zitrone. Person murmelte 'Rache'. Wie viele Buchstaben?", answer: "5", hint: "R-A-C-H-E zĂ€hlen", clue: "Maren sprach von Rache." }, { question: "Kamera: Jacke mit 'B-R-A-U-H-A-U-S'. Welches Wort?", answer: "BRAUHAUS", hint: "Buchstaben zusammen", clue: "Person ging Richtung Brauhaus." }, { question: "Flyer: 'Live-Musik im Brewckau!'. VollstĂ€ndiger Name?", answer: "BREWCKAU", hint: "Schon am Thiemplatz gefunden", clue: "Im Brewckau sollte Wahrheit erzĂ€hlt werden." } ], nextLocationId: 4 }, { id: 4, name: "Brewckau", qrCode: "QR-BREWCKAU-2025", icon: "đŸș", description: "Bastis Lieblingsort.", storyInfo: "Im Brewckau. Bastis zweites Zuhause.", newspaper: { title: "HOFFNUNG FÜR LUCAS", date: "Dezember 2021", content: "Lucas K. hat Kampf gegen Sucht gewonnen. 'Ein Freund war immer da', sagt Lucas." }, whatsapp: { title: "Bastis Notiz", messages: [ { sender: "Basti", time: "30. Dez 2024", text: "Maren Wahrheit sagen. Ich half Lucas. Silvester 23:50." } ] }, riddles: [ { question: "Notizbuch: '23:50 M.K. treffen. Die ___ ĂŒber L. erzĂ€hlen'. 8 Buchstaben?", answer: "WAHRHEIT", hint: "Was wollte er sagen?", clue: "Basti wollte Wahrheit ĂŒber Lucas erzĂ€hlen." }, { question: "Bier: 'FĂŒr L.K., der es geschafft hat - 2021'. Was bedeutet 'geschafft'?", answer: "ENTZUG", hint: "Lucas ĂŒberwand Problem", clue: "Lucas schaffte Drogenentzug - dank Basti." }, { question: "Bierdeckel: 'Wer hat L. wirklich gerettet?' 5 Buchstaben, beginnt mit B.", answer: "BASTI", hint: "Wer half Lucas?", clue: "Basti rettete Lucas - Maren wusste es nie." } ], nextLocationId: null } ]; const suspects = ["Maren Koslowski", "SpĂ€ti-Besitzer", "Unbekannter"]; const weapons = ["Gift (Arsen)", "Schlag", "Erstickung"]; const motives = ["Rache fĂŒr Lucas' Tod", "Geld", "Eifersucht"]; const totalRiddles = 15; const progress = Math.round((gameState.collectedClues.length / totalRiddles) * 100); const handlePayment = () => { setGameState(prev => ({ ...prev, isPaid: true })); }; const handleQRScan = (locationId) => { const newProgress = [...gameState.locationProgress]; newProgress[locationId].qrScanned = true; setGameState(prev => ({ ...prev, locationProgress: newProgress })); }; const handleAnswerSubmit = (locationId, riddleIndex, answer) => { const location = locations[locationId]; const riddle = location.riddles[riddleIndex]; if (answer.toUpperCase().trim() === riddle.answer.toUpperCase()) { const newProgress = [...gameState.locationProgress]; newProgress[locationId].riddlesSolved += 1; const newClues = [...gameState.collectedClues, riddle.clue]; setGameState(prev => ({ ...prev, locationProgress: newProgress, collectedClues: newClues })); if (newProgress[locationId].riddlesSolved === location.riddles.length) { if (location.nextLocationId !== null) { newProgress[location.nextLocationId].revealed = true; setGameState(prev => ({ ...prev, locationProgress: newProgress })); alert(`✓ Richtig!\n\n${riddle.clue}\n\nAlle RĂ€tsel gelöst! NĂ€chster Ort: ${locations[location.nextLocationId].name}`); } else { setGameState(prev => ({ ...prev, gameCompleted: true })); alert(`✓ Richtig!\n\n${riddle.clue}\n\nAlle Orte besucht! Löse jetzt den Fall!`); } } else { alert(`✓ Richtig!\n\n${riddle.clue}`); } return true; } return false; }; const handleFinalSubmit = () => { const correct = gameState.finalAnswers.suspect === "Maren Koslowski" && gameState.finalAnswers.weapon === "Gift (Arsen)" && gameState.finalAnswers.motive === "Rache fĂŒr Lucas' Tod"; if (correct) { alert("🎉 FALL GELÖST!\n\nMaren vergiftete Basti mit Arsen aus Rache. Sie glaubte, Basti ließ Lucas im Stich. Die Wahrheit: Basti half Lucas aus der Sucht. Maren wusste es nie."); } else { alert("❌ Falsch. PrĂŒfe deine Hinweise!"); } }; if (!gameState.isPaid) { return (

🔍 BUCKAU CRIMES

Fall 1: Mord am Silvesterabend

Silvester 2024. Basti wurde tot am Thiemplatz gefunden. Die Polizei tappt im Dunkeln. Du bist die einzige Hoffnung.

14,99 €

); } if (gameState.gameCompleted) { return (

🔍 LÖSE DEN FALL

Hinweise:

{gameState.collectedClues.map((clue, idx) => (
‱ {clue}
))}
); } const currentLoc = locations[gameState.currentLocation]; const currentProgress = gameState.locationProgress[gameState.currentLocation]; return (
{/* Header */}

🔍 DER MORDFALL IN BUCKAU

{/* Karte */}

Karte von Buckau

{locations.map((loc, idx) => { const prog = gameState.locationProgress[idx]; const isLocked = !prog.revealed; const isDone = prog.riddlesSolved === loc.riddles.length; return ( ); })}
{/* Fortschritt */}
Hinweise: {gameState.collectedClues.length}/{totalRiddles} {progress}%
{/* Hauptinhalt */}
{currentLoc.icon}

{currentLoc.name}

{currentLoc.description}

{!currentProgress.qrScanned ? (
đŸ“±

QR-Code scannen

Code: {currentLoc.qrCode}

) : ( <>

{currentLoc.storyInfo}

{currentLoc.newspaper && (
BUCKAUER KÄSEBLATT

{currentLoc.newspaper.title}

{currentLoc.newspaper.date}

{currentLoc.newspaper.content}

)} {currentLoc.whatsapp && (
{currentLoc.whatsapp.title}
{currentLoc.whatsapp.messages.map((msg, idx) => (
{msg.sender !== "Basti" &&

{msg.sender}

}

{msg.text}

{msg.time}

))}
)}

Polizeiakte - RĂ€tsel

{currentLoc.riddles.map((riddle, idx) => { const isSolved = currentProgress.riddlesSolved > idx; return ( handleAnswerSubmit(gameState.currentLocation, idx, answer)} /> ); })}
)}
{gameState.collectedClues.length > 0 && (

Hinweise ({gameState.collectedClues.length}/{totalRiddles})

{gameState.collectedClues.slice(-3).map((clue, idx) => (
✓ {clue}
))}
)}
); }; const RiddleComponent = ({ riddle, riddleNumber, isSolved, onSubmit }) => { const [answer, setAnswer] = useState(''); const [showHint, setShowHint] = useState(false); const [showError, setShowError] = useState(false); const handleSubmit = () => { const correct = onSubmit(answer); if (!correct) { setShowError(true); setTimeout(() => setShowError(false), 2000); } else { setAnswer(''); setShowHint(false); } }; if (isSolved) { return (
RÀtsel {riddleNumber} gelöst!
); } return (

📋 RĂ€tsel {riddleNumber}

{riddle.question}

{showHint && (

💡 {riddle.hint}

)}
setAnswer(e.target.value)} onKeyPress={(e) => e.key === 'Enter' && handleSubmit()} placeholder="Deine Antwort..." className="flex-1 bg-gray-900 border-2 border-amber-700 p-3 rounded-lg text-white" />
{showError && (
Falsch. Nochmal versuchen!
)}
); }; export default BuckauCrimesGame;