reveal tier scores only up to next question
This commit is contained in:
parent
a3ea4da327
commit
19c5db0c5b
14
quiz.js
14
quiz.js
|
@ -169,11 +169,6 @@ function startQuiz() {
|
|||
var i;
|
||||
console.log('startQuiz');
|
||||
|
||||
questions.forEach(function(q) {
|
||||
$('#tiers').append('<li></li>');
|
||||
$('#tiers li').last().text(q.tier);
|
||||
});
|
||||
|
||||
updateScores();
|
||||
|
||||
$('#setup').fadeOut(700, function() {
|
||||
|
@ -221,6 +216,14 @@ function updateScores() {
|
|||
$('#players .player' + i).hide();
|
||||
}
|
||||
}
|
||||
|
||||
/* Update tiers */
|
||||
$('#tiers').empty();
|
||||
for(i = 0; i < questions.length; i++) {
|
||||
var text = i <= currentQuestion ? questions[i].tier : "?";
|
||||
$('#tiers').append('<li></li>');
|
||||
$('#tiers li').last().text(text);
|
||||
}
|
||||
}
|
||||
|
||||
function censorIrcMessage(text) {
|
||||
|
@ -488,6 +491,7 @@ function switchToGame() {
|
|||
if (key === " ") {
|
||||
// next question:
|
||||
currentQuestion++;
|
||||
updateScores();
|
||||
saveGamestate();
|
||||
$('#game').fadeOut(500, function() {
|
||||
switchToScoreboard();
|
||||
|
|
Loading…
Reference in New Issue
Block a user