import { useState, useEffect } from 'react'; import { Shuffle, RotateCcw, AlertCircle, CheckCircle, HelpCircle } from 'lucide-react'; export default function WhoSaidItGame() { const [quotes, setQuotes] = useState([ { text: "I am a god.", author: "Kanye", context: "Lyrics from Kanye's song 'I Am a God' (2013)" }, { text: "The victor will never be asked if he told the truth.", author: "Hitler", context: "Speech in Munich (1936)" }, { text: "I'm the number one human being in music. That means any person that's living or breathing is number two.", author: "Kanye", context: "Interview with Zane Lowe (2013)" }, { text: "Great liars are also great magicians.", author: "Hitler", context: "From 'Mein Kampf' (1925)" }, { text: "My greatest pain in life is that I will never be able to see myself perform live.", author: "Kanye", context: "VH1 Storytellers (2009)" }, { text: "If you tell a big enough lie and tell it frequently enough, it will be believed.", author: "Hitler", context: "Attributed statement on propaganda" }, { text: "I am Warhol. I am the No. 1 most impactful artist of our generation. I am Shakespeare in the flesh.", author: "Kanye", context: "Interview on Sway in the Morning (2013)" }, { text: "The very first essential for success is a perpetually constant and regular employment of violence.", author: "Hitler", context: "From 'Mein Kampf' (1925)" }, { text: "I feel like I'm too busy writing history to read it.", author: "Kanye", context: "Twitter (2012)" }, { text: "Words build bridges into unexplored regions.", author: "Hitler", context: "Speech at the Nuremberg Rally (1934)" }, // Adding more quotes as requested { text: "I'm like a vessel, and God has chosen me to be the voice and the connector.", author: "Kanye", context: "Interview with Zane Lowe (2019)" }, { text: "Strength lies not in defense but in attack.", author: "Hitler", context: "From 'Mein Kampf' (1925)" }, { text: "I'm a creative genius and there's no other way to word it.", author: "Kanye", context: "Interview with Jimmy Kimmel (2013)" }, { text: "The art of leadership consists in consolidating the attention of the people against a single adversary.", author: "Hitler", context: "From 'Mein Kampf' (1925)" }, { text: "People always tell you, 'Be humble. Be humble.' When was the last time someone told you to be amazing?", author: "Kanye", context: "Interview with Charlie Rose (2015)" }, { text: "The receptivity of the masses is very limited, their intelligence is small, but their power of forgetting is enormous.", author: "Hitler", context: "From 'Mein Kampf' (1925)" }, { text: "For me, money is not my definition of success. Inspiring people is a definition of success.", author: "Kanye", context: "Interview with Forbes (2019)" }, { text: "It is not truth that matters, but victory.", author: "Hitler", context: "Attributed statement" }, { text: "I will go down as the voice of this generation, of this decade, I will be the loudest voice.", author: "Kanye", context: "Interview with AP (2008)" }, { text: "Anyone who sees and paints a sky green and fields blue ought to be sterilized.", author: "Hitler", context: "Comment on modern art (1937)" }, { text: "I think I do myself a disservice by comparing myself to Steve Jobs and Walt Disney and human beings that we've seen before. It should be more like Willy Wonka.", author: "Kanye", context: "Interview with New York Times (2013)" }, { text: "The doom of a nation can be averted only by a storm of flowing passion, but only those who are passionate themselves can arouse passion in others.", author: "Hitler", context: "From 'Mein Kampf' (1925)" }, { text: "I'm going to be the Tupac of product.", author: "Kanye", context: "Interview with SHOWSTUDIO (2015)" }, { text: "The leader of genius must have the ability to make different opponents appear as if they belonged to one category.", author: "Hitler", context: "From 'Mein Kampf' (1925)" } ]); const [currentQuoteIndex, setCurrentQuoteIndex] = useState(0); const [score, setScore] = useState(0); const [gameState, setGameState] = useState('playing'); // playing, feedback, finished const [selectedAnswer, setSelectedAnswer] = useState(null); const [timeLeft, setTimeLeft] = useState(15); const [showInfo, setShowInfo] = useState(false); // Shuffle quotes on game start useEffect(() => { shuffleQuotes(); }, []); // Timer countdown useEffect(() => { if (gameState !== 'playing' || showInfo) return; const timer = timeLeft > 0 && setInterval(() => { setTimeLeft(timeLeft - 1); }, 1000); if (timeLeft === 0) { handleAnswer(null); } return () => clearInterval(timer); }, [timeLeft, gameState, showInfo]); const shuffleQuotes = () => { const shuffled = [...quotes].sort(() => Math.random() - 0.5); setQuotes(shuffled); setCurrentQuoteIndex(0); setScore(0); setGameState('playing'); setTimeLeft(15); }; const handleAnswer = (answer) => { setSelectedAnswer(answer); const isCorrect = answer === quotes[currentQuoteIndex].author; if (isCorrect) { setScore(score + 1); } setGameState('feedback'); }; const nextQuote = () => { if (currentQuoteIndex < quotes.length - 1) { setCurrentQuoteIndex(currentQuoteIndex + 1); setGameState('playing'); setSelectedAnswer(null); setTimeLeft(15); } else { setGameState('finished'); } }; const restartGame = () => { shuffleQuotes(); }; const toggleInfo = () => { setShowInfo(!showInfo); }; const renderQuote = () => { const currentQuote = quotes[currentQuoteIndex]; return (
"{currentQuote.text}"
{gameState === 'playing' && !showInfo && (
)} {gameState === 'feedback' && (
{selectedAnswer === currentQuote.author ? ( ) : ( )} {selectedAnswer === currentQuote.author ? "Correct!" : selectedAnswer === null ? "Time's up!" : "Incorrect!"}

Said by: {currentQuote.author}

{currentQuote.context}

)}
); }; const renderInfoScreen = () => { return (

About This Game

This game presents real quotes from Kanye West and Adolf Hitler. The purpose is to highlight how rhetoric can sometimes be shocking regardless of the source, and to encourage critical thinking about the words of public figures.

The quotes are presented without additional context during the guessing phase. After guessing, you'll see the context of when and where the quote was said.

Note: This game is meant for educational purposes and to encourage reflection on rhetoric and historical context. It is not meant to equate these two individuals, who are vastly different in their historical impact and actions.

); }; const renderResults = () => { const percentage = Math.round((score / quotes.length) * 100); return (

Game Complete!

Your Score:

{score} / {quotes.length}

{percentage}% correct

); }; return (

Who Said It?

{gameState !== 'finished' && ( )}
{gameState !== 'finished' && !showInfo && (
Question {currentQuoteIndex + 1} of {quotes.length}
Score: {score}
)} {gameState === 'playing' && !showInfo && (
Time remaining: {timeLeft}s
)}
{showInfo ? renderInfoScreen() : gameState === 'finished' ? renderResults() : renderQuote()}
); }