Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BarajaDeck

Hierarchy

Index

Constructors

Accessors

  • get discardedCards(): Card[]
  • Copy of the array of cards in discard pile

    Returns Card[]

  • get heldCards(): Card[]
  • Copy of the array of cards in held pile

    Returns Card[]

  • get remainingCards(): Card[]
  • Copy of the array of cards in deck pile

    Returns Card[]

  • get remainingLength(): number
  • The current number of cards remaining in the deck pile

    Returns number

  • get totalLength(): number
  • The total number of all cards belonging to this deck, regardless of what pile they are currently in

    Returns number

Methods

  • Add a new Card to the deck, placing at the end of the given pile (defaults to "deck").

    Note: Does not confirm that the Card does not already belong to a deck before adding.

    Parameters

    Returns void

  • discard(card: Card): any
  • discardAllHeld(): void
  • draw(count?: number): Card[]
  • Draw the given number of cards, place them in the held pile, and return the drawn cards

    Parameters

    • count: number = 1

    Returns Card[]

  • drawFromBottom(count?: number): Card[]
  • Draw the given number of cards from the bottom of the deck pile, place them in the held pile, and return the drawn cards

    Parameters

    • count: number = 1

    Returns Card[]

  • drawToDiscard(count?: number): Card[]
  • Draw the given number of cards, place them in the discard pile, and return the drawn cards

    Parameters

    • count: number = 1

    Returns Card[]

  • drawToDiscardFromBottom(count?: number): Card[]
  • Merge the given deck into this one, moving all cards belonging to the given deck into this deck.

    Parameters

    Returns void

  • remove(card: Card): void
  • Removes a card from the deck entirely.

    Note: Does not confirm that the card belongs to this deck before removing.

    Parameters

    Returns void

  • shuffleAll(): void
  • shuffleDeckAndDiscard(): void
  • shuffleDiscard(): void
  • shuffleRemaining(): void

Generated using TypeDoc