function showFinalResult(guesses, gameStatus) {
    var cell = $(".game-board");
    if (gameStatus) {
        console.log('You win!!! Guesses needed: ' + guesses);
        if( cell.hasClass("btn-primary") ) {
            cell.removeClass("btn-primary").addClass("btn-success");
        }
    } else {
        console.log('You lose!!! Maximum guesses reached: ' + guesses + "/" + maxGuesses);
        if( cell.hasClass("btn-primary") ) {
            cell.removeClass("btn-primary").addClass("btn-fail");
        }
    }
}
/* Changes the game-board to green on victory and red on failure.
 * TODO: Perhaps display message in the entry list when correct?
 * ------------------------------------------------------------------------- */
Changes the game-board to green on victory and red on failure.
Changes the game - board to green on victory and red on failure .
function showFinalResult(guesses, gameStatus) {
    var cell = $(".game-board");
    if (gameStatus) {
        console.log('You win!!! Guesses needed: ' + guesses);
        if( cell.hasClass("btn-primary") ) {
            cell.removeClass("btn-primary").addClass("btn-success");
        }
    } else {
        console.log('You lose!!! Maximum guesses reached: ' + guesses + "/" + maxGuesses);
        if( cell.hasClass("btn-primary") ) {
            cell.removeClass("btn-primary").addClass("btn-fail");
        }
    }
}
function showFinalResult ( guesses , gameStatus ) { var cell = $ ( ".game-board" ) ; if ( gameStatus ) { console . log ( 'You win!!! Guesses needed: ' + guesses ) ; if ( cell . hasClass ( "btn-primary" ) ) { cell . removeClass ( "btn-primary" ) . addClass ( "btn-success" ) ; } } else { console . log ( 'You lose!!! Maximum guesses reached: ' + guesses + "/" + maxGuesses ) ; if ( cell . hasClass ( "btn-primary" ) ) { cell . removeClass ( "btn-primary" ) . addClass ( "btn-fail" ) ; } } }
Changes the game-board to green on victory and red on failure.
Changes the game - board to green on victory and red on failure .