Copy of the array of cards in held pile
Copy of the array of cards in deck pile
The current number of cards remaining in the deck pile
The total number of all cards belonging to this deck, regardless of what pile they are currently in
Move the given card into the discard pile
Moves all currently held cards to the discard pile
Draw the given number of cards, place them in the held pile, and return the drawn cards
Draw the given number of cards from the bottom of the deck pile, place them in the held pile, and return the drawn cards
Draw the given number of cards, place them in the discard pile, and return the drawn cards
Draw the given number of cards from the bottom of the deck, place them in the discard pile, and return the drawn cards
Finds all cards in the deck matching the given filtering function
const aces = deck.findCards((card) => card.rank === ace);
Finds the given card and returns an object representing its current location (pile, and index in that pile)
Removes a card from the deck entirely.
Note: Does not confirm that the card belongs to this deck before removing.
Moves all cards back to the deck pile and shuffles the deck
Moves all cards in the discard back to the deck and shuffles the deck
Shuffles the cards in the discard pile and then places them at the end of the deck
Shuffles the cards remaining in the deck
Generated using TypeDoc
Copy of the array of cards in discard pile