game.js
// Progress to next question or summary screen
Progress to next question or summary screen
Progress to next question or summary screen
NextQuestion() {
        document.removeEventListener('keydown', EnterEventNext);
        if (this.Round + 1 == this.QuestionCount) {
            this.GoToSummary();
        }
        else {
            this.Attempt = 0;
            document.getElementById("attempt").textContent = 1;
            LastAnswer = null;
            document.getElementById("cityinput").className = "form-control";
            document.getElementById("noneselectederror").style.display = "none";
            document.getElementById("currentround").textContent = ++this.Round + 1;
            document.getElementById("radio0").checked = false;
            document.getElementById("radio1").checked = false;
            document.getElementById("radio2").checked = false;
            document.getElementById("radio3").checked = false;
            this.AskQuestion(this.Round);
        }
    }
NextQuestion ( ) { document . removeEventListener ( 'keydown' , EnterEventNext ) ; if ( this . Round + 1 == this . QuestionCount ) { this . GoToSummary ( ) ; } else { this . Attempt = 0 ; document . getElementById ( "attempt" ) . textContent = 1 ; LastAnswer = null ; document . getElementById ( "cityinput" ) . className = "form-control" ; document . getElementById ( "noneselectederror" ) . style . display = "none" ; document . getElementById ( "currentround" ) . textContent = ++ this . Round + 1 ; document . getElementById ( "radio0" ) . checked = false ; document . getElementById ( "radio1" ) . checked = false ; document . getElementById ( "radio2" ) . checked = false ; document . getElementById ( "radio3" ) . checked = false ; this . AskQuestion ( this . Round ) ; } }
Progress to next question or summary screen
Progress to next question or summary screen
// Destroy keydown event // Check if this round is the last // Else progress to next question // Cleanup // Reset attempts // Clean validation // Increment round counter // Deselect all radios // Ask next question