@Cards-TS
    Preparing search index...

    Class representing N standard 54 card decks' draw and discard pile, tracking the top card

    Index

    Constructors

    • Create a new deck

      Parameters

      • num: number = 0

        the number of decks to include (0 or more)

      • shouldShuffle: boolean = true

        whether the deck should be shuffled automatically

      • includeJokers: boolean = true
      • ranks: Rank[] = Rank.ranks

      Returns Deck

      the new deck

    Properties

    cards: Card[]

    The cards still in the deck

    make private without breaking tests

    discards: Card[] = []

    The cards that have been discarded

    type: "deck" = 'deck'

    Accessors

    Methods

    • Shuffle the discards back into the deck

      Returns boolean

      whether there are still cards in the deck