<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kim Milyoner Olmak İster? - Tam Sürüm</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
:root { --primary-bg: #0d1b2a; --secondary-bg: #1b263b; --accent-color: #e09f3e; --text-color: #e0e1dd; --correct-color: #2a9d8f; --incorrect-color: #e76f51; }
body { background-color: var(--primary-bg); background-image: radial-gradient(circle, #1c3d52 0%, #0d1b2a 100%); font-family: 'Roboto', sans-serif; color: var(--text-color); display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; padding: 15px; box-sizing: border-box; }
#game-container { width: 100%; max-width: 1200px; height: 90vh; max-height: 700px; display: flex; flex-direction: column; border: 3px solid var(--accent-color); border-radius: 20px; background-color: rgba(27, 38, 59, 0.8); box-shadow: 0 0 40px rgba(224, 159, 62, 0.3); overflow: hidden; }
#top-panel { display: flex; justify-content: space-between; align-items: center; padding: 20px 40px; border-bottom: 2px solid var(--secondary-bg); }
#timer { font-size: 3em; font-weight: 700; color: var(--accent-color); }
#jokers-container { display: flex; gap: 25px; }
.joker-button, #sound-toggle-btn { background-color: var(--secondary-bg); border: 2px solid var(--accent-color); color: var(--text-color); border-radius: 50%; width: 70px; height: 70px; font-size: 1.8em; cursor: pointer; transition: all 0.2s ease; display: flex; justify-content: center; align-items: center; }
.joker-button:hover:not(:disabled), #sound-toggle-btn:hover { background-color: var(--accent-color); color: var(--primary-bg); }
.joker-button:disabled { background-color: #333; border-color: #555; color: #777; cursor: default; text-decoration: line-through; }
#main-content { display: flex; flex-grow: 1; padding: 20px; gap: 20px; overflow: hidden; }
#game-area { flex-grow: 3; display: flex; flex-direction: column; justify-content: center; }
#prize-pyramid { flex-grow: 1; background-color: rgba(0,0,0,0.2); border-radius: 10px; padding: 10px; display: flex; flex-direction: column-reverse; }
.prize-level { list-style: none; padding: 8px 15px; margin: 2px 0; border-radius: 5px; color: var(--text-color); transition: all 0.3s ease; text-align: right; font-size: clamp(0.7rem, 2vmin, 1rem); }
.prize-level.current { background-color: var(--accent-color); color: var(--primary-bg); font-weight: 700; transform: scale(1.05); }
.prize-level.guarantee { border: 1px dashed white; font-weight: bold; }
#question-box { background-color: var(--secondary-bg); border: 2px solid var(--accent-color); border-radius: 10px; padding: 25px; font-size: clamp(1rem, 2.5vmin, 1.4rem); text-align: center; margin-bottom: 20px; min-height: 100px; display: flex; justify-content: center; align-items: center; }
#answers-box { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.answer-button { background-color: var(--secondary-bg); border: 2px solid var(--accent-color); border-radius: 10px; padding: 20px; font-size: clamp(0.9rem, 2.2vmin, 1.2rem); color: var(--text-color); cursor: pointer; transition: background-color 0.2s; position: relative; text-align: left; }
.answer-button:hover:not(:disabled) { background-color: #2a3b52; }
.answer-button.selected { background-color: orange; }
.answer-button.correct { background-color: var(--correct-color); animation: flash 1s; }
.answer-button.incorrect { background-color: var(--incorrect-color); }
.answer-button:disabled { opacity: 0.5; cursor: default; }
@keyframes flash { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
</style>
</head>
<body>
<div id="game-container">
<div id="top-panel">
<div id="jokers-container">
<button id="joker-5050" class="joker-button">50:50</button>
<button id="joker-phone" class="joker-button">📞</button>
<button id="joker-audience" class="joker-button">👥</button>
</div>
<div id="timer">60</div>
<button id="sound-toggle-btn" title="Sesi Aç/Kapat">🔇</button>
</div>
<div id="main-content">
<div id="game-area">
<div id="question-box">Yarışmaya Hoş Geldiniz! <br/><br/> Sesleri etkinleştirmek için sağ üstteki 🔇 ikonuna tıklayın.</div>
<div id="answers-box"></div>
</div>
<div id="prize-pyramid"></div>
</div>
<div id="start-button-container" style="text-align: center; padding: 20px;">
<button id="start-game-btn" style="font-size: 1.5em; padding: 15px 30px; border-radius: 10px; cursor: pointer;">Oyunu Başlat</button>
</div>
</div>
<audio id="sound-suspense" src="https://www.myinstants.com/media/sounds/2000-question-who-wants-to-be-a-millionaire_-mp3cut.mp3" preload="auto" loop></audio>
<audio id="sound-correct" src="https://www.myinstants.com/media/sounds/correct_VsVqwRb.mp3" preload="auto"></audio>
<audio id="sound-wrong" src="https://www.myinstants.com/media/sounds/wrong-answer-sound-effect.mp3" preload="auto"></audio>
<audio id="sound-lifeline" src="https://www.myinstants.com/media/sounds/milionerzy-glosowanie-publicznosci.mp3" preload="auto"></audio>
<script>
document.addEventListener('DOMContentLoaded', () => {
const prizeLadder = [1000, 2000, 3000, 5000, 7500, 15000, 30000, 60000, 125000, 250000, 500000, 1000000];
const guaranteeLevels = [1, 6];
const questionBank = [
[
{ q: "Halk arasında 'vatanı' olarak bilinen sebze hangisidir?", a: ["Patates", "Soğan", "Domates", "Patlıcan"], c: 2 }, { q: "Trafik ışıklarında 'bekle' anlamına gelen renk hangisidir?", a: ["Kırmızı", "Yeşil", "Sarı", "Mavi"], c: 2 }, { q: "'Her __ bir yoğurt yiyişi vardır' atasözünde boş bırakılan yere ne gelir?", a: ["Aşçının", "Yiğidin", "Çobanın", "Doktorun"], c: 1 }, { q: "Damlaya damlaya ne olur?", a: ["Taş", "Sel", "Göl", "Su"], c: 2 }, { q: "Bir elin nesi var, iki elin __ var?", a: ["Parmağı", "Gücü", "Sesi", "Tadı"], c: 2 }
],
[
{ q: "Bir hafta kaç gündür?", a: ["5", "6", "7", "8"], c: 2 }, { q: "Basketbolda bir takım sahada kaç oyuncu ile yer alır?", a: ["5", "6", "7", "11"], c: 0 }, { q: "Gökkuşağında hangi renk bulunmaz?", a: ["Kırmızı", "Siyah", "Mavi", "Yeşil"], c: 1 }, { q: "Atatürk'ün annesinin adı nedir?", a: ["Makbule", "Fikriye", "Latife", "Zübeyde"], c: 3 }, { q: "Türkiye'nin en kalabalık şehri hangisidir?", a: ["Ankara", "İzmir", "Bursa", "İstanbul"], c: 3 }
],
[
{ q: "Hangi hayvan 'ormanın kralı' olarak bilinir?", a: ["Kaplan", "Ayı", "Aslan", "Fil"], c: 2 }, { q: "Penguenler hangi kıtada doğal olarak yaşar?", a: ["Afrika", "Avustralya", "Antarktika", "Asya"], c: 2 }, { q: "İngiltere'nin başkenti neresidir?", a: ["Paris", "Roma", "Berlin", "Londra"], c: 3 }, { q: "Hangisi bir duyu organı değildir?", a: ["Göz", "Mide", "Burun", "Deri"], c: 1 }, { q: "Pamuk Prenses masalındaki kötü kraliçenin sihirli nesnesi nedir?", a: ["Lamba", "Asa", "Ayna", "Yüzük"], c: 2 }
],
[
{ q: "Ünlü 'İstiklal Marşı'mızın şairi kimdir?", a: ["Namık Kemal", "Orhan Veli", "Mehmet Akif Ersoy", "Nazım Hikmet"], c: 2 }, { q: "Dünya'nın en büyük okyanusu hangisidir?", a: ["Atlas Okyanusu", "Hint Okyanusu", "Arktik Okyanusu", "Pasifik Okyanusu"], c: 3 }, { q: "Bir üçgenin iç açıları toplamı kaç derecedir?", a: ["90", "180", "270", "360"], c: 1 }, { q: "Japonya'nın geleneksel güreş sporuna ne ad verilir?", a: ["Judo", "Karate", "Sumo", "Tekvando"], c: 2 }, { q: "Hangisi bir müzik aleti değildir?", a: ["Keman", "Pusula", "Flüt", "Gitar"], c: 1 }
],
[
{ q: "Hangi gezegenin belirgin halkaları vardır?", a: ["Mars", "Venüs", "Satürn", "Merkür"], c: 2 }, { q: "Osmanlı Devleti'nin ilk başkenti neresidir?", a: ["İstanbul", "Bursa", "Edirne", "Konya"], c: 1 }, { q: "Fotosentez yapmak için bitkilerin hangisine ihtiyacı yoktur?", a: ["Güneş ışığı", "Oksijen", "Karbondioksit", "Su"], c: 1 }, { q: "'Küçük Prens' kitabının yazarı kimdir?", a: ["Jules Verne", "Victor Hugo", "Antoine de Saint-Exupéry", "Albert Camus"], c: 2 }, { q: "Amazon Nehri hangi kıtada yer alır?", a: ["Afrika", "Asya", "Kuzey Amerika", "Güney Amerika"], c: 3 }
],
[
{ q: "Hangi ülke 'Çizme' şeklinde bir haritaya sahiptir?", a: ["İspanya", "Yunanistan", "İtalya", "Norveç"], c: 2 }, { q: "'Sinekli Bakkal' romanının yazarı kimdir?", a: ["Yaşar Kemal", "Halide Edib Adıvar", "Reşat Nuri Güntekin", "Peyami Safa"], c: 1 }, { q: "Mısır piramitleri ne amaçla inşa edilmiştir?", a: ["Saray", "Tapınak", "Gözlemevi", "Mezar"], c: 3 }, { q: "Helyum, periyodik tabloda hangi gaz grubuna aittir?", a: ["Halojenler", "Alkali Metaller", "Soy Gazlar", "Toprak Alkali Metaller"], c: 2 }
],
[
{ q: "Periyodik tabloda 'Au' simgesi hangi elemente aittir?", a: ["Gümüş", "Altın", "Demir", "Bakır"], c: 1 }, { q: "Leonardo da Vinci'nin 'Son Akşam Yemeği' tablosu nerededir?", a: ["Paris", "Roma", "Floransa", "Milano"], c: 3 }, { q: "Eiffel Kulesi hangi şehirde bulunmaktadır?", a: ["Londra", "Berlin", "Paris", "Madrid"], c: 2 }, { q: "Hangi yapı Çin Seddi'nin bir parçasıdır?", a: ["Tac Mahal", "Kolezyum", "Gözetleme Kuleleri", "Piramitler"], c: 2 }, { q: "Termometreyi kim icat etmiştir?", a: ["Isaac Newton", "Galileo Galilei", "Anders Celsius", "Daniel Gabriel Fahrenheit"], c: 1 }
],
[
{ q: "Hangi icat Thomas Edison ile doğrudan ilişkilendirilmez?", a: ["Fonograf", "Ampul", "Telefon", "Kinetoskop"], c: 2 }, { q: "Dünyanın en yüksek şelalesi olan Angel Şelalesi hangi ülkededir?", a: ["Brezilya", "ABD", "Venezuela", "Kanada"], c: 2 }, { q: "İnsan vücudunda normalde kaç adet kemik bulunur?", a: ["186", "206", "226", "246"], c: 1 }, { q: "Truva Savaşı'nda 'tahta at' hilesi kimin fikriydi?", a: ["Aşil", "Hektor", "Agamemnon", "Odysseus"], c: 3 }, { q: "Yönetmenliğini Orson Welles'in yaptığı sinema klasiği hangisidir?", a: ["Baba", "Kazablanka", "Rıhtımlar Üzerinde", "Yurttaş Kane"], c: 3 }
],
[
{ q: "Hangi olay Fransız İhtilali'nin başlangıcı kabul edilir?", a: ["Waterloo Savaşı", "Viyana Kongresi", "Bastille Baskını", "İnsan ve Yurttaş Hakları Bildirisi"], c: 2 }, { q: "Nobel Barış Ödülü hangi şehirde verilir?", a: ["Stockholm", "Cenevre", "Oslo", "Helsinki"], c: 2 }, { q: "Bir megabyte kaç kilobyte'a eşittir?", a: ["1000", "1024", "2048", "512"], c: 1 }, { q: "Van Gogh'un 'Yıldızlı Gece' tablosu şu an hangi müzede sergilenmektedir?", a: ["Louvre Müzesi", "Prado Müzesi", "Modern Sanat Müzesi (MoMA)", "British Museum"], c: 2 }, { q: "Hangisi bir bilgisayar programlama dili değildir?", a: ["Python", "HTML", "Java", "C++"], c: 1 }
],
[
{ q: "Güneş sistemindeki en büyük gezegen hangisidir?", a: ["Satürn", "Neptün", "Uranüs", "Jüpiter"], c: 3 }, { q: "İlk Türk kadın savaş pilotu kimdir?", a: ["Sabiha Gökçen", "Leman Bozkurt Altınçekiç", "Bedriye Tahir Gökmen", "Afife Jale"], c: 0 }, { q: "Hangi antik harika günümüze kadar büyük ölçüde ayakta kalmıştır?", a: ["Rodos Heykeli", "İskenderiye Feneri", "Babil'in Asma Bahçeleri", "Keops Piramidi"], c: 3 }, { q: "1929 Dünya Ekonomik Bunalımı'nın başlangıcı olarak bilinen günün adı nedir?", a: ["Kanlı Pazar", "Kara Perşembe", "Uzun Cuma", "Kıyamet Günü"], c: 1 }, { q: "Picasso'nun Guernica tablosu hangi olayı tasvir eder?", a: ["Fransız İhtilali", "İspanya İç Savaşı", "I. Dünya Savaşı", "II. Dünya Savaşı"], c: 1 }
],
[
{ q: "Kuantum mekaniğinin kurucularından sayılan ve 'belirsizlik ilkesi' ile tanınan bilim insanı kimdir?", a: ["Albert Einstein", "Niels Bohr", "Werner Heisenberg", "Erwin Schrödinger"], c: 2 }, { q: "Hangi yazar 'Don Kişot' romanı ile tanınır?", a: ["Dante Alighieri", "Miguel de Cervantes", "Giovanni Boccaccio", "Victor Hugo"], c: 1 }, { q: "J.R.R. Tolkien'in yazdığı 'Yüzüklerin Efendisi' serisindeki 'Tek Yüzük' nerede dövülmüştür?", a: ["Gondolin", "Moria", "Hüküm Dağı", "Ayrıkvadi"], c: 2 }, { q: "'Felsefenin Babası' olarak kabul edilen Antik Yunan filozofu kimdir?", a: ["Platon", "Aristoteles", "Sokrates", "Herakleitos"], c: 2 }, { q: "İpek Yolu hangi iki medeniyeti birbirine bağlamıştır?", a: ["Roma ve Mısır", "Çin ve Avrupa", "Hindistan ve Pers", "Yunan ve Babil"], c: 1 }
],
[
{ q: "1969'da Ay'a ilk ayak basan insan kimdir?", a: ["Yuri Gagarin", "Buzz Aldrin", "John Glenn", "Neil Armstrong"], c: 3 }, { q: "İzafiyet teorisi hangi bilim insanı tarafından geliştirilmiştir?", a: ["Isaac Newton", "Galileo Galilei", "Albert Einstein", "Stephen Hawking"], c: 2 }, { q: "DNA'nın çift sarmal yapısını keşfeden bilim insanları kimlerdir?", a: ["Marie Curie ve Pierre Curie", "Watson ve Crick", "Darwin ve Wallace", "Pasteur ve Koch"], c: 1 }, { q: "Schrödinger'in kedisi, hangi alandaki bir düşünce deneyidir?", a: ["Klasik Fizik", "Genel Görelilik", "Kuantum Mekaniği", "Termodinamik"], c: 2 }, { q: "Fahrenheit ve Celsius sıcaklık ölçekleri hangi derecede eşitlenir?", a: ["0", "32", "-40", "100"], c: 2 }
]
];
const timerEl = document.getElementById('timer');
const prizePyramidEl = document.getElementById('prize-pyramid');
const questionBox = document.getElementById('question-box');
const answersBox = document.getElementById('answers-box');
const startButton = document.getElementById('start-game-btn');
const startButtonContainer = document.getElementById('start-button-container');
const joker5050Btn = document.getElementById('joker-5050');
const jokerPhoneBtn = document.getElementById('joker-phone');
const jokerAudienceBtn = document.getElementById('joker-audience');
const soundToggleBtn = document.getElementById('sound-toggle-btn');
const soundSuspense = document.getElementById('sound-suspense');
const soundCorrect = document.getElementById('sound-correct');
const soundWrong = document.getElementById('sound-wrong');
const soundLifeline = document.getElementById('sound-lifeline');
const allSounds = [soundSuspense, soundCorrect, soundWrong, soundLifeline];
let gameState = {};
let isSoundEnabled = false;
let areSoundsUnlocked = false;
function init() {
startButton.addEventListener('click', startGame);
soundToggleBtn.addEventListener('click', toggleSound);
joker5050Btn.addEventListener('click', useFiftyFiftyJoker);
jokerPhoneBtn.addEventListener('click', usePhoneJoker);
jokerAudienceBtn.addEventListener('click', useAudienceJoker);
buildPrizePyramid();
}
function toggleSound() {
isSoundEnabled = !isSoundEnabled;
soundToggleBtn.textContent = isSoundEnabled ? '🔊' : '🔇';
if (isSoundEnabled && !areSoundsUnlocked) {
allSounds.forEach(sound => {
sound.play().then(() => {
sound.pause();
sound.currentTime = 0;
}).catch(error => {
// This error is expected if the user hasn't interacted yet.
});
});
areSoundsUnlocked = true;
}
if (!isSoundEnabled) {
allSounds.forEach(sound => stopSound(sound));
}
}
function startGame() {
gameState = {
currentQuestionIndex: 0,
jokers: { fiftyFifty: true, phone: true, audience: true },
isAnswered: false,
timer: 60,
timerInterval: null,
currentQuestionData: null
};
startButtonContainer.style.display = 'none';
answersBox.style.display = 'grid';
joker5050Btn.disabled = false;
jokerPhoneBtn.disabled = false;
jokerAudienceBtn.disabled = false;
loadQuestion();
}
function loadQuestion() {
gameState.isAnswered = false;
const levelQuestions = questionBank[gameState.currentQuestionIndex];
const currentQuestion = levelQuestions[Math.floor(Math.random() * levelQuestions.length)];
gameState.currentQuestionData = currentQuestion;
questionBox.textContent = currentQuestion.q;
answersBox.innerHTML = '';
const answerLetters = ['A: ', 'B: ', 'C: ', 'D: '];
currentQuestion.a.forEach((answer, index) => {
const button = document.createElement('button');
button.className = 'answer-button';
button.textContent = answerLetters[index] + answer;
button.dataset.index = index;
button.addEventListener('click', selectAnswer);
answersBox.appendChild(button);
});
updatePrizePyramid();
startTimer();
playSound(soundSuspense, true);
}
function selectAnswer(event) {
if (gameState.isAnswered) return;
gameState.isAnswered = true;
stopTimer();
stopSound(soundSuspense);
const selectedButton = event.currentTarget;
const selectedAnswerIndex = parseInt(selectedButton.dataset.index);
const currentQuestion = gameState.currentQuestionData;
const correctAnswerIndex = currentQuestion.c;
document.querySelectorAll('.answer-button').forEach(btn => btn.disabled = true);
selectedButton.classList.add('selected');
setTimeout(() => {
if (selectedAnswerIndex === correctAnswerIndex) {
playSound(soundCorrect);
selectedButton.classList.remove('selected');
selectedButton.classList.add('correct');
setTimeout(nextQuestion, 2000);
} else {
playSound(soundWrong);
selectedButton.classList.add('incorrect');
document.querySelector(`.answer-button[data-index='${correctAnswerIndex}']`).classList.add('correct');
setTimeout(() => endGame(true), 2000);
}
}, 1500);
}
function nextQuestion() {
if (gameState.currentQuestionIndex < prizeLadder.length - 1) {
gameState.currentQuestionIndex++;
loadQuestion();
} else {
stopSound(soundSuspense);
questionBox.textContent = `TEBRİKLER! BÜYÜK ÖDÜLÜ KAZANDINIZ: ${prizeLadder[prizeLadder.length - 1].toLocaleString()} TL!`;
endGame(false);
}
}
function endGame(lost) {
stopTimer();
stopSound(soundSuspense);
let prizeWon = 0;
if (lost) {
let baraj = 0;
if (gameState.currentQuestionIndex >= guaranteeLevels[1]) {
baraj = guaranteeLevels[1];
prizeWon = prizeLadder[baraj];
} else if (gameState.currentQuestionIndex >= guaranteeLevels[0]) {
baraj = guaranteeLevels[0];
prizeWon = prizeLadder[baraj];
}
} else {
prizeWon = prizeLadder[prizeLadder.length - 1];
}
questionBox.textContent = `Oyun Bitti! Kazandığınız Tutar: ${prizeWon.toLocaleString()} TL`;
answersBox.innerHTML = '';
answersBox.style.display = 'none';
startButtonContainer.style.display = 'block';
}
function useFiftyFiftyJoker() {
if (!gameState.jokers.fiftyFifty || gameState.isAnswered) return;
playSound(soundLifeline);
gameState.jokers.fiftyFifty = false;
joker5050Btn.disabled = true;
const currentQuestion = gameState.currentQuestionData;
const correctAnswerIndex = currentQuestion.c;
const wrongAnswers = [0, 1, 2, 3].filter(i => i !== correctAnswerIndex);
wrongAnswers.splice(Math.floor(Math.random() * wrongAnswers.length), 1);
document.querySelectorAll('.answer-button').forEach(btn => {
if (wrongAnswers.includes(parseInt(btn.dataset.index))) {
btn.disabled = true;
btn.style.opacity = '0.3';
btn.textContent = ' ';
}
});
}
function usePhoneJoker() {
if (!gameState.jokers.phone || gameState.isAnswered) return;
playSound(soundLifeline);
gameState.jokers.phone = false;
jokerPhoneBtn.disabled = true;
const currentQuestion = gameState.currentQuestionData;
const correctAnswerIndex = currentQuestion.c;
const answerLetters = ['A', 'B', 'C', 'D'];
let suggestedAnswerIndex;
if (Math.random() < 0.85) { suggestedAnswerIndex = correctAnswerIndex; }
else { const wrongAnswers = [0,1,2,3].filter(i => i !== correctAnswerIndex); suggestedAnswerIndex = wrongAnswers[Math.floor(Math.random() * wrongAnswers.length)]; }
questionBox.textContent = `Arkadaşın düşünüyor... Sanırım doğru cevap ${answerLetters[suggestedAnswerIndex]} şıkkı.`;
setTimeout(() => { questionBox.textContent = currentQuestion.q; }, 4000);
}
function useAudienceJoker() {
if (!gameState.jokers.audience || gameState.isAnswered) return;
playSound(soundLifeline);
gameState.jokers.audience = false;
jokerAudienceBtn.disabled = true;
const currentQuestion = gameState.currentQuestionData;
const correctAnswerIndex = currentQuestion.c;
let votes = [5, 10, 15];
let remaining = 100 - votes.reduce((a, b) => a + b, 0);
let finalVotes = [0,0,0,0];
finalVotes[correctAnswerIndex] = remaining;
let wrongIndices = [0,1,2,3].filter(i => i !== correctAnswerIndex);
wrongIndices.forEach((val, idx) => { finalVotes[val] = votes[idx]; });
let resultText = "Seyirci Oyları: ";
const answerLetters = ['A', 'B', 'C', 'D'];
finalVotes.forEach((vote, i) => { resultText += ` ${answerLetters[i]}:%${vote} `; });
questionBox.textContent = resultText;
setTimeout(() => { questionBox.textContent = currentQuestion.q; }, 5000);
}
function startTimer() {
gameState.timer = 60;
timerEl.textContent = gameState.timer;
if(gameState.timerInterval) clearInterval(gameState.timerInterval);
gameState.timerInterval = setInterval(() => {
gameState.timer--;
timerEl.textContent = gameState.timer;
if (gameState.timer <= 0) {
timeUp();
}
}, 1000);
}
function stopTimer() { clearInterval(gameState.timerInterval); }
function timeUp() {
stopTimer();
playSound(soundWrong);
stopSound(soundSuspense);
questionBox.textContent = "Süre Doldu!";
endGame(true);
}
function playSound(soundElement, loop = false) {
if (!isSoundEnabled) return;
soundElement.loop = loop;
soundElement.currentTime = 0;
soundElement.play().catch(e => {});
}
function stopSound(soundElement) {
soundElement.pause();
soundElement.currentTime = 0;
}
function buildPrizePyramid() {
prizePyramidEl.innerHTML = '';
prizeLadder.forEach((prize, index) => {
const level = document.createElement('li');
level.className = 'prize-level';
level.id = `prize-${index}`;
level.textContent = `${index + 1}. ${prize.toLocaleString()} TL`;
if (guaranteeLevels.includes(index)) {
level.classList.add('guarantee');
}
prizePyramidEl.appendChild(level);
});
}
function updatePrizePyramid() {
document.querySelectorAll('.prize-level').forEach(el => el.classList.remove('current'));
const currentLevelEl = document.getElementById(`prize-${gameState.currentQuestionIndex}`);
if (currentLevelEl) {
currentLevelEl.classList.add('current');
}
}
init();
});
</script>
</body>
</html>






Selamlar gemini ile milyoner oyununu yaptık sesler dahil geliştirmek size kalmış ben basit bir şey yaptırdım