function calculateScore() {
    // the counter represents the amount of moves.
    if (counter > 14 && counter <= 16) {
        thirdStar.className = "fa fa-star-half-o";
    }

    if (counter > 16 && counter <= 18) {
        thirdStar.className = "fa fa-star-o";
    }

    if (counter > 18 && counter <= 20) {
        secondStar.className = "fa fa-star-half-o";
    }

    if (counter > 20 && counter <= 22) {
        secondStar.className = "fa fa-star-o";
    }

    if (counter > 22 && counter <= 24) {
        firstStar.className = "fa fa-star-half-o";
    }

    if (counter > 24) {
        firstStar.className = "fa fa-star-o";
    }
}
/**
 * @description Calculate the score in stars. If the player solves the game
 * in a maximum of 14 moves, then the player receives a full score, 3 stars.
 * If the player needs more than 14 moves to solve the game, the player loses
 * half a star for every 2 additional moves.
 */
@description Calculate the score in stars. If the player solves the game
in a maximum of 14 moves, then the player receives a full score, 3 stars.
If the player needs more than 14 moves to solve the game, the player loses
half a star for every 2 additional moves.
@description Calculate the score in stars . If the player solves the game in a maximum of 14 moves then the player receives a full score 3 stars . If the player needs more than 14 moves to solve the game the player loses half a star for every 2 additional moves .
function calculateScore() {
    if (counter > 14 && counter <= 16) {
        thirdStar.className = "fa fa-star-half-o";
    }
    if (counter > 16 && counter <= 18) {
        thirdStar.className = "fa fa-star-o";
    }
    if (counter > 18 && counter <= 20) {
        secondStar.className = "fa fa-star-half-o";
    }
    if (counter > 20 && counter <= 22) {
        secondStar.className = "fa fa-star-o";
    }
    if (counter > 22 && counter <= 24) {
        firstStar.className = "fa fa-star-half-o";
    }
    if (counter > 24) {
        firstStar.className = "fa fa-star-o";
    }
}
function calculateScore ( ) { if ( counter > 14 && counter <= 16 ) { thirdStar . className = "fa fa-star-half-o" ; } if ( counter > 16 && counter <= 18 ) { thirdStar . className = "fa fa-star-o" ; } if ( counter > 18 && counter <= 20 ) { secondStar . className = "fa fa-star-half-o" ; } if ( counter > 20 && counter <= 22 ) { secondStar . className = "fa fa-star-o" ; } if ( counter > 22 && counter <= 24 ) { firstStar . className = "fa fa-star-half-o" ; } if ( counter > 24 ) { firstStar . className = "fa fa-star-o" ; } }
@description Calculate the score in stars.
@description Calculate the score in stars .
// the counter represents the amount of moves.