function resetGame() {
    // hide all cards.
    document.querySelectorAll(".card").forEach((card) => {
        card.classList.remove("open", "show", "match");
    });
    // reset the stars to three full stars.
    document.querySelectorAll(".stars li").forEach((star) => {
        star.querySelector("i").className = "fa fa-star";
    });
    // reset move counter, moves, time, amount of matches, open cards,
    // first card, and restart the game.
    counter = 0;
    moves.textContent = 0;
    clearInterval(elapsedTime);
    minutes.textContent = 0;
    seconds.textContent = 0;
    matches = 0;
    openCards = [];
    firstCard = true;
    startGame();
}
/**
 * @description Reset all values to their initial state and restart the game.
 */
@description Reset all values to their initial state and restart the game.
@description Reset all values to their initial state and restart the game .
function resetGame() {
    document.querySelectorAll(".card").forEach((card) => {
        card.classList.remove("open", "show", "match");
    });
    document.querySelectorAll(".stars li").forEach((star) => {
        star.querySelector("i").className = "fa fa-star";
    });
    counter = 0;
    moves.textContent = 0;
    clearInterval(elapsedTime);
    minutes.textContent = 0;
    seconds.textContent = 0;
    matches = 0;
    openCards = [];
    firstCard = true;
    startGame();
}
function resetGame ( ) { document . querySelectorAll ( ".card" ) . forEach ( ( card ) => { card . classList . remove ( "open" , "show" , "match" ) ; } ) ; document . querySelectorAll ( ".stars li" ) . forEach ( ( star ) => { star . querySelector ( "i" ) . className = "fa fa-star" ; } ) ; counter = 0 ; moves . textContent = 0 ; clearInterval ( elapsedTime ) ; minutes . textContent = 0 ; seconds . textContent = 0 ; matches = 0 ; openCards = [ ] ; firstCard = true ; startGame ( ) ; }
@description Reset all values to their initial state and restart the game.
@description Reset all values to their initial state and restart the game .
// hide all cards. // reset the stars to three full stars. // reset move counter, moves, time, amount of matches, open cards, // first card, and restart the game.