src/deck.js
function filterCards(cards) {
    // Option was passed in to disabled this filter.
    // User is probably requesting to discard.
    if (noCardFilter) {
      return cards
    }
    const [head, ...tail] = cards
    if (head && head.filter) {
      return [head].concat(head.filter(tail))
    }
    return cards
  }
function filterCards(cards) {
    // Option was passed in to disabled this filter.
    // User is probably requesting to discard.
    if (noCardFilter) {
      return cards
    }
    const [head, ...tail] = cards
    if (head && head.filter) {
      return [head].concat(head.filter(tail))
    }
    return cards
  }
function filterCards ( cards ) { // Option was passed in to disabled this filter. // User is probably requesting to discard. if ( noCardFilter ) { return cards } const [ head , ... tail ] = cards if ( head && head . filter ) { return [ head ] . concat ( head . filter ( tail ) ) } return cards }
Apply any card-specific filters. For instance, Gut Punch filters any card following itself as it is a standalone attack.
Apply any card - specific filters . For instance Gut Punch filters any card following itself as it is a standalone attack .