function updateScore() {
        var questionScore = currentQuestionScoringSystem.points;
        // applying multiplier
        if (questionTimer.getCurrentTime() < currentQuestionScoringSystem.lower_time_bound) {
            questionScore = questionScore * currentQuestionScoringSystem.lower_bound_multiplier;
        } else if (questionTimer.getCurrentTime() > currentQuestionScoringSystem.higher_time_bound) {
            questionScore = questionScore * currentQuestionScoringSystem.higher_bound_multiplier;
        }
        // applying penalty
        questionScore = questionScore - (currentQuestionScoringSystem.number_wrong_answers * currentQuestionScoringSystem.wrong_answer_penalty);
        if (questionScore > 0) {
            score += Math.floor(questionScore);
        }
        currentQuestionScoringSystem = null;
    }
/**
     * Allows to update the score in the game session.
     */
Allows to update the score in the game session.
Allows to update the score in the game session .
function updateScore() {
        var questionScore = currentQuestionScoringSystem.points;
        if (questionTimer.getCurrentTime() < currentQuestionScoringSystem.lower_time_bound) {
            questionScore = questionScore * currentQuestionScoringSystem.lower_bound_multiplier;
        } else if (questionTimer.getCurrentTime() > currentQuestionScoringSystem.higher_time_bound) {
            questionScore = questionScore * currentQuestionScoringSystem.higher_bound_multiplier;
        }
        questionScore = questionScore - (currentQuestionScoringSystem.number_wrong_answers * currentQuestionScoringSystem.wrong_answer_penalty);
        if (questionScore > 0) {
            score += Math.floor(questionScore);
        }
        currentQuestionScoringSystem = null;
    }
function updateScore ( ) { var questionScore = currentQuestionScoringSystem . points ; if ( questionTimer . getCurrentTime ( ) < currentQuestionScoringSystem . lower_time_bound ) { questionScore = questionScore * currentQuestionScoringSystem . lower_bound_multiplier ; } else if ( questionTimer . getCurrentTime ( ) > currentQuestionScoringSystem . higher_time_bound ) { questionScore = questionScore * currentQuestionScoringSystem . higher_bound_multiplier ; } questionScore = questionScore - ( currentQuestionScoringSystem . number_wrong_answers * currentQuestionScoringSystem . wrong_answer_penalty ) ; if ( questionScore > 0 ) { score += Math . floor ( questionScore ) ; } currentQuestionScoringSystem = null ; }
Allows to update the score in the game session.
Allows to update the score in the game session .
// applying multiplier // applying penalty