Passaparola Oyunu body { font-family: Arial, sans-serif; text-align: center; background-color: #f4f4f4; } .game-container { width: 80%; max-width: 700px; margin: auto; background: white; padding: 20px; border-radius: 10px; box-shadow: 0px 0px 10px gray; } .circle-container { position: relative; width: 300px; height: 300px; margin: auto; } .letter { position: absolute; width: 40px; height: 40px; display: flex; justify-content: center; align-items: center; background: #3498db; color: white; font-size: 18px; font-weight: bold; cursor: pointer; border-radius: 50%; transition: 0.3s; } .letter:hover { background: #2980b9; } .question-container { display: none; margin-top: 20px; } input { width: 100%; padding: 10px; margin: 10px 0; font-size: 16px; text-transform: uppercase; } .submit-btn { padding: 10px; background: #2ecc71; color: white; border: none; cursor: pointer; font-size: 16px; border-radius: 5px; } .submit-btn:hover { background: #27ae60; } .correct { background: green !important; } .wrong { background: red !important; } Passaparola Oyunu Cevabı Kontrol Et // Türkçe Alfabesindeki Harfler const letters = ["A", "B", "C", "Ç", "D", "E", "F", "G", "Ğ", "H", "I", "İ", "J", "K", "L", "M", "N", "O", "Ö", "P", "R", "S", "Ş", "T", "U", "Ü", "V", "Y", "Z"]; // Sorular ve cevaplar (örnek) const questions = { "A": { question: "Mikroskobik canlılardan biri", answer: "AMİP" }, "B": { question: "En basit canlı türü?", answer: "BAKTERİ" }, "C": { question: "Üreme, büyüme, solunum yapma gibi özellikler gösteren varlıklar", answer: "CANLILAR" }, "Ç": { question: "Çiçekli bitkilerin üreme organı nedir?", answer: "ÇİÇEK" }, "D": { question: "Kuvvet ölçmek için kullanılan bir araç", answer: "DİNAMOMETRE" }, "E": { question: "Lastik, sünger, yay gibi cisimlere verilen isim", answer: "ESNEK" }, "F": { question: "Sadece otla beslenen memeli bir hayvan", answer: "FİL" } }; let selectedLetter = ""; // Harfleri çember etrafına yerleştirme const circleContainer = document.getElementById("circleContainer"); const radius = 130; // Çemberin yarıçapı const centerX = 150; const centerY = 150; const totalLetters = letters.length; letters.forEach((letter, index) => { const angle = (index / totalLetters) * (2 * Math.PI); const x = centerX + radius * Math.cos(angle); const y = centerY + radius * Math.sin(angle); let div = document.createElement("div"); div.classList.add("letter"); div.textContent = letter; div.style.left = `${x}px`; div.style.top = `${y}px`; div.onclick = () => selectLetter(letter); circleContainer.appendChild(div); }); function selectLetter(letter) { selectedLetter = letter; if (questions[letter]) { document.getElementById("questionText").textContent = questions[letter].question; document.getElementById("answerInput").value = ""; document.getElementById("questionContainer").style.display = "block"; } else { alert("Bu harf için henüz bir soru yok."); } } function checkAnswer() { let userAnswer = document.getElementById("answerInput").value.trim().toUpperCase(); // Kullanıcı cevabını büyük harfe çevir let correctAnswer = questions[selectedLetter]?.answer.toUpperCase(); // Doğru cevabı da büyük harfe çevir let letterDivs = document.querySelectorAll(".letter"); letterDivs.forEach(div => { if (div.textContent === selectedLetter) { if (userAnswer === correctAnswer) { div.classList.add("correct"); } else { div.classList.add("wrong"); } } }); document.getElementById("questionContainer").style.display = "none"; } Super Mario - Fen Bilimleri Oyunu body { background-color: #87CEEB; margin: 0; overflow: hidden; font-family: Arial, sans-serif; } canvas { display: block; background: url('https://i.imgur.com/NLoKKqG.png') repeat-x; } .question-box { display: none; position: absolute; top: 30%; left: 50%; transform: translate(-50%, -50%); background: white; padding: 20px; border-radius: 10px; text-align: center; box-shadow: 0px 0px 10px black; } .question-box input { width: 80%; padding: 10px; margin: 10px 0; } .question-box button { padding: 10px; background: #2ecc71; color: white; border: none; cursor: pointer; } Cevabı Kontrol Et // Oyun Alanı const canvas = document.getElementById("gameCanvas"); const ctx = canvas.getContext("2d"); canvas.width = window.innerWidth; canvas.height = 400; let mario = { x: 50, y: 300, width: 40, height: 40, speed: 5, gravity: 2, velocityY: 0, jumping: false }; let blocks = [ { x: 300, y: 270, width: 50, height: 50, question: "Dünya'nın uydusu nedir?", answer: "Ay" }, { x: 600, y: 270, width: 50, height: 50, question: "En büyük gezegen hangisidir?", answer: "Jüpiter" }, { x: 900, y: 270, width: 50, height: 50, question: "Su hangi bileşik formüldedir?", answer: "H2O" } ]; let rightPressed = false; let leftPressed = false; document.addEventListener("keydown", keyDownHandler); document.addEventListener("keyup", keyUpHandler); function keyDownHandler(event) { if (event.key === "ArrowRight") rightPressed = true; if (event.key === "ArrowLeft") leftPressed = true; if (event.key === " " && !mario.jumping) { mario.velocityY = -15; mario.jumping = true; } } function keyUpHandler(event) { if (event.key === "ArrowRight") rightPressed = false; if (event.key === "ArrowLeft") leftPressed = false; } function update() { if (rightPressed) mario.x += mario.speed; if (leftPressed) mario.x -= mario.speed; mario.y += mario.velocityY; mario.velocityY += mario.gravity; if (mario.y >= 300) { mario.y = 300; mario.jumping = false; } blocks.forEach(block => { if ( mario.x < block.x + block.width && mario.x + mario.width > block.x && mario.y < block.y + block.height && mario.y + mario.height > block.y ) { mario.x -= 50; showQuestion(block); } }); } function draw() { ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.fillStyle = "red"; ctx.fillRect(mario.x, mario.y, mario.width, mario.height); ctx.fillStyle = "brown"; blocks.forEach(block => { ctx.fillRect(block.x, block.y, block.width, block.height); }); } function loop() { update(); draw(); requestAnimationFrame(loop); } function showQuestion(block) { document.getElementById("questionBox").style.display = "block"; document.getElementById("questionText").textContent = block.question; document.getElementById("questionBox").dataset.answer = block.answer; } function checkAnswer() { let userAnswer = document.getElementById("answerInput").value.trim().toLowerCase(); let correctAnswer = document.getElementById("questionBox").dataset.answer.toLowerCase(); if (userAnswer === correctAnswer) { alert("Doğru! Devam edebilirsin!"); } else { alert("Yanlış! Tekrar dene."); mario.x = 50; } document.getElementById("questionBox").style.display = "none"; document.getElementById("answerInput").value = ""; } loop();