function startGame(){
     // shuffles deck
     cards = shuffle(cards);
     // remove all exisiting classes from each card
     for (var i = 0; i < cards.length; i++){
         deck.innerHTML = "";
         [].forEach.call(cards, function(item) {
             deck.appendChild(item);
         });
         cards[i].classList.remove("show", "open", "match", "disabled");
     }
     // reset moves
     moves = 0;
     counter.innerHTML = moves;
     // reset rating
     for (var i= 0; i < stars.length; i++){
         stars[i].style.color = "#ffd700";
         stars[i].style.visibility = "visible";
     }
     //reset timer
     second = 0;
     minute = 0;
     hour = 0;
     var timer = document.querySelector(".timer");
     timer.innerHTML = "0 mins 0 secs";
     clearInterval(interval);
 }
/**
 * @description function to start a new game
 */
@description function to start a new game
@description function to start a new game
function startGame(){
     cards = shuffle(cards);
     for (var i = 0; i < cards.length; i++){
         deck.innerHTML = "";
         [].forEach.call(cards, function(item) {
             deck.appendChild(item);
         });
         cards[i].classList.remove("show", "open", "match", "disabled");
     }
     moves = 0;
     counter.innerHTML = moves;
     for (var i= 0; i < stars.length; i++){
         stars[i].style.color = "#ffd700";
         stars[i].style.visibility = "visible";
     }
     second = 0;
     minute = 0;
     hour = 0;
     var timer = document.querySelector(".timer");
     timer.innerHTML = "0 mins 0 secs";
     clearInterval(interval);
 }
function startGame ( ) { cards = shuffle ( cards ) ; for ( var i = 0 ; i < cards . length ; i ++ ) { deck . innerHTML = "" ; [ ] . forEach . call ( cards , function ( item ) { deck . appendChild ( item ) ; } ) ; cards [ i ] . classList . remove ( "show" , "open" , "match" , "disabled" ) ; } moves = 0 ; counter . innerHTML = moves ; for ( var i = 0 ; i < stars . length ; i ++ ) { stars [ i ] . style . color = "#ffd700" ; stars [ i ] . style . visibility = "visible" ; } second = 0 ; minute = 0 ; hour = 0 ; var timer = document . querySelector ( ".timer" ) ; timer . innerHTML = "0 mins 0 secs" ; clearInterval ( interval ) ; }
@description function to start a new game
@description function to start a new game
// shuffles deck // remove all exisiting classes from each card // reset moves // reset rating //reset timer