79794783

Date: 2025-10-20 10:11:03
Score: 0.5
Natty:
Report link

import { useState } from 'react'; import { Card, CardContent } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { motion } from 'framer-motion';

export default function GameEdukasi() { const [score, setScore] = useState(0); const [question, setQuestion] = useState(generateQuestion()); const [answer, setAnswer] = useState('');

function generateQuestion() { const a = Math.floor(Math.random() * 10) + 1; const b = Math.floor(Math.random() * 10) + 1; return { text: ${a} + ${b} = ?, correct: a + b }; }

function checkAnswer() { if (parseInt(answer) === question.correct) { setScore(score + 1); } setQuestion(generateQuestion()); setAnswer(''); }

return (

<motion.h1 initial={{ y: -20, opacity: 0 }} animate={{ y: 0, opacity: 1 }} className="text-4xl font-bold mb-6 text-blue-700"> 🎮 Game Edukasi Matematika

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Luthxz