client/src/shared/cardHelper.js
// The function can be used for sorting the deck
The function can be used for sorting the deck
The function can be used for sorting the deck
static compareCards(first, second) {
    if (first.value === second.value) {
      return first.suit.localeCompare(second.suit);
    }
    if (first.value === 1) {
      return 1;
    }
    else if (second.value === 1) {
      return -1;
    }
    return first.value - second.value;
  }
static compareCards ( first , second ) { if ( first . value === second . value ) { return first . suit . localeCompare ( second . suit ) ; } if ( first . value === 1 ) { return 1 ; } else if ( second . value === 1 ) { return - 1 ; } return first . value - second . value ; }
The function can be used for sorting the deck
The function can be used for sorting the deck