function restart() {

  matchedCards = 0;

  $('.card').empty()
  .removeClass('open show clicked match animated bounce');

  shuffle(cardOrder);

  $('.moves').html("");

  if (move >= 20) {
    $('.stars').append('<li><i class="fa fa-star"></i></li>');
    $('.stars').append('<li><i class="fa fa-star"></i></li>');

  } else if (move >= 12) {
    $('.stars').append('<li><i class="fa fa-star"></i></li>');

  }

  move = 0;
  restartTracker = 1;
  time = new Date();
  openCards.splice(0, 2);
}
/*
 * Restart game
 *   - Removes li items of .deck
 *   - Shuffles and rebuilds deck .li
 *   - Reset move, matchedCards, openCards and time counters
 */
Restart game
- Removes li items of .deck
- Shuffles and rebuilds deck .li
- Reset move, matchedCards, openCards and time counters
Restart game - Removes li items of . deck - Shuffles and rebuilds deck . li - Reset move matchedCards openCards and time counters
function restart() {
  matchedCards = 0;
  $('.card').empty()
  .removeClass('open show clicked match animated bounce');
  shuffle(cardOrder);
  $('.moves').html("");
  if (move >= 20) {
    $('.stars').append('<li><i class="fa fa-star"></i></li>');
    $('.stars').append('<li><i class="fa fa-star"></i></li>');
  } else if (move >= 12) {
    $('.stars').append('<li><i class="fa fa-star"></i></li>');
  }
  move = 0;
  restartTracker = 1;
  time = new Date();
  openCards.splice(0, 2);
}
function restart ( ) { matchedCards = 0 ; $ ( '.card' ) . empty ( ) . removeClass ( 'open show clicked match animated bounce' ) ; shuffle ( cardOrder ) ; $ ( '.moves' ) . html ( "" ) ; if ( move >= 20 ) { $ ( '.stars' ) . append ( '<li><i class="fa fa-star"></i></li>' ) ; $ ( '.stars' ) . append ( '<li><i class="fa fa-star"></i></li>' ) ; } else if ( move >= 12 ) { $ ( '.stars' ) . append ( '<li><i class="fa fa-star"></i></li>' ) ; } move = 0 ; restartTracker = 1 ; time = new Date ( ) ; openCards . splice ( 0 , 2 ) ; }
Restart game
   - Removes li items of .deck
   - Shuffles and rebuilds deck .li
   - Reset move, matchedCards, openCards and time counters
Restart game - Removes li items of . deck - Shuffles and rebuilds deck . li - Reset move matchedCards openCards and time counters