diff --git a/data.example/questions.json b/data.example/questions.json index 0b0bb4f..e06c76b 100644 --- a/data.example/questions.json +++ b/data.example/questions.json @@ -6,7 +6,9 @@ { "text": "Monatlich auf FTP" }, { "text": "Nie", "right": true } - ] }, + ], + "explanation": { "text": "Deshalb ist die Hälfte weg." } + }, { "text": "Was meint dieses Logo?", "image": "http://www.c3d2.de/images/ck.png", "tier": 100, diff --git a/quiz.js b/quiz.js index b3a8f95..369912f 100644 --- a/quiz.js +++ b/quiz.js @@ -174,19 +174,7 @@ function takeJoker(activePlayer, joker) { } } -// Game screen is the one with the question in question -function switchToGame() { - var i, q = questions[currentQuestion]; - var activePlayer = null, choice = null; // can be null - - var updateTier = function() { - var s = q.tier; - if (activePlayer !== null) - s += ' — ' + playerNames[activePlayer]; - $('#tier').text(s); - }; - updateTier(); - +function setQuestionContents(q) { $('#question').empty(); if (q.text) { $('#question').append('

'); @@ -200,6 +188,22 @@ function switchToGame() { $('#question').append('