From e62628c93edb04efbfb25e806d0422b934640f98 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 00:19:39 +0000 Subject: [PATCH] Add interactive educational game Implement a web application that simulates a narrative experience focused on raising awareness about disinformation and state actors. The app will allow players to engage in an interactive game where they run a disinformation campaign, utilizing various strategies and receiving guidance from virtual experts. The goal is to enhance critical thinking and media literacy through dynamic media simulations and decision-based storytelling. [skip gpt_engineer] --- src/pages/Index.tsx | 161 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 155 insertions(+), 6 deletions(-) diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx index 52ea22c..d1b6760 100644 --- a/src/pages/Index.tsx +++ b/src/pages/Index.tsx @@ -1,14 +1,163 @@ -// Update this page (the content is just a fallback if you fail to update the page) +import { useState } from "react"; +import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card"; +import { Button } from "@/components/ui/button"; +import { useToast } from "@/components/ui/use-toast"; + +interface GameStage { + id: number; + title: string; + description: string; + choices: { + id: number; + text: string; + description: string; + impact: string; + }[]; +} + +const stages: GameStage[] = [ + { + id: 1, + title: "Stage 1: Laying the Groundwork", + description: "Before launching your campaign to convince people that 2+2=5, you need to establish your presence.", + choices: [ + { + id: 1, + text: "Deploy Bot Network", + description: "Create a network of automated social media accounts to amplify your message.", + impact: "Increased reach but risk of detection" + }, + { + id: 2, + text: "Start Subtle Discussions", + description: "Begin posting thought-provoking questions about mathematical certainty.", + impact: "Slower spread but more authentic engagement" + }, + { + id: 3, + text: "Create Academic Facade", + description: "Establish a pseudo-academic organization questioning traditional mathematics.", + impact: "Enhanced credibility but requires more resources" + } + ] + } + // More stages will be added as we expand the game +]; const Index = () => { + const [currentStage, setCurrentStage] = useState(0); + const [gameStarted, setGameStarted] = useState(false); + const { toast } = useToast(); + + const handleStartGame = () => { + setGameStarted(true); + toast({ + title: "Welcome to the Disinformation Campaign Simulator", + description: "Learn how misinformation spreads by making strategic choices.", + }); + }; + + const handleChoice = (choiceId: number) => { + toast({ + title: "Choice Made", + description: `You've selected option ${choiceId}. Watch how it affects your campaign.`, + }); + // We'll add more complex logic here as we develop the game + setCurrentStage((prev) => prev + 1); + }; + + if (!gameStarted) { + return ( +
+ Experience firsthand how disinformation campaigns operate by attempting to convince + the public that 2+2=5. Through this simulation, learn to recognize and resist real-world + manipulation tactics. +
++ You've completed the simulation. Through this experience, you've learned how + disinformation campaigns operate and how to better recognize them in the real world. +
+ +Start building your amazing project here!
+Impact: {choice.impact}
+