js/app.js
/**
 * @description Updates rating based on move counts. Also starts the clock
 */
@description Updates rating based on move counts. Also starts the clock
@description Updates rating based on move counts . Also starts the clock
function updateRating() {
    const movesCount = Number(movesHolder.textContent) + 1; 
    movesHolder.textContent = movesCount;
    if (movesCount >= 15 && movesCount <= 20) {
        updateClass(starElementChildren[2].firstElementChild, 'fa fa-star-half-empty', false);
    } else if (movesCount >= 21 && movesCount <= 24) {
        updateClass(starElementChildren[2].firstElementChild, 'fa fa-star-o', false);
        updateClass(starElementChildren[1].firstElementChild, 'fa fa-star-half-empty', false);
    } else if (movesCount > 24) {
        applyClassInBulk(starElementChildren, 'fa fa-star-o', false);
    }
    startClock(movesCount);
}
function updateRating ( ) { const movesCount = Number ( movesHolder . textContent ) + 1 ; movesHolder . textContent = movesCount ; if ( movesCount >= 15 && movesCount <= 20 ) { updateClass ( starElementChildren [ 2 ] . firstElementChild , 'fa fa-star-half-empty' , false ) ; } else if ( movesCount >= 21 && movesCount <= 24 ) { updateClass ( starElementChildren [ 2 ] . firstElementChild , 'fa fa-star-o' , false ) ; updateClass ( starElementChildren [ 1 ] . firstElementChild , 'fa fa-star-half-empty' , false ) ; } else if ( movesCount > 24 ) { applyClassInBulk ( starElementChildren , 'fa fa-star-o' , false ) ; } startClock ( movesCount ) ; }
@description Updates rating based on move counts.
@description Updates rating based on move counts .
//Don't want to create a global variable for this