function updateRating(num){
  switch (num) {
    case 0:
      for (let i = 0; i < score.length; i++) {
        score[i].style.color = '#000';
      }
      break;
    case 20:
      score[2].style.color = '#fff';
      rating--;
      break;
    case 35:
      score[1].style.color = '#fff';
      rating--;
      break;
  }
}
/*
* Invoked by activateCard().
* Compare number of moves with star rating.
* Decrease rating accordingly to number of moves.
* @ param {number} num - value of moves variable.
*/
Invoked by activateCard().
Compare number of moves with star rating.
Decrease rating accordingly to number of moves.
Invoked by activateCard () . Compare number of moves with star rating . Decrease rating accordingly to number of moves .
function updateRating(num){
  switch (num) {
    case 0:
      for (let i = 0; i < score.length; i++) {
        score[i].style.color = '#000';
      }
      break;
    case 20:
      score[2].style.color = '#fff';
      rating--;
      break;
    case 35:
      score[1].style.color = '#fff';
      rating--;
      break;
  }
}
function updateRating ( num ) { switch ( num ) { case 0 : for ( let i = 0 ; i < score . length ; i ++ ) { score [ i ] . style . color = '#000' ; } break ; case 20 : score [ 2 ] . style . color = '#fff' ; rating -- ; break ; case 35 : score [ 1 ] . style . color = '#fff' ; rating -- ; break ; } }
Invoked by activateCard().
Invoked by activateCard () .