js/app.js
/**
 * @description Pops the final Congratulations modal when all the cards are matched in the game
 */
@description Pops the final Congratulations modal when all the cards are matched in the game
@description Pops the final Congratulations modal when all the cards are matched in the game
function popFinalScreen() {
    const matchCount = document.querySelectorAll('.match').length;
    if (matchCount === 16) {
        clearTimeout(t);
        document.querySelector('.overlay').classList.add('target');
        popContentHolder.firstElementChild.textContent = `You have completed this game in ${timerHolder.textContent}.`;
        popContentHolder.children[1].textContent = `Total moves: ${movesHolder.textContent}.`;
        popContentHolder.lastElementChild.firstElementChild.innerHTML = starsHolder.outerHTML;
        storeInLocalStorage();
    }
}
function popFinalScreen ( ) { const matchCount = document . querySelectorAll ( '.match' ) . length ; if ( matchCount === 16 ) { clearTimeout ( t ) ; document . querySelector ( '.overlay' ) . classList . add ( 'target' ) ; popContentHolder . firstElementChild . textContent = ` ${ timerHolder . textContent } ` ; popContentHolder . children [ 1 ] . textContent = ` ${ movesHolder . textContent } ` ; popContentHolder . lastElementChild . firstElementChild . innerHTML = starsHolder . outerHTML ; storeInLocalStorage ( ) ; } }
@description Pops the final Congratulations modal when all the cards are matched in the game
@description Pops the final Congratulations modal when all the cards are matched in the game