Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Deck

Deck represents the source of cards in play. As such, a Deck is merely a pile of cards that are drawn from throughout the duration of the ongoing game.

Hierarchy

Implements

Index

Constructors

constructor

Properties

name

name: string = "Deck"

Methods

addCard

  • addCard(card: ICard): this

addCards

  • addCards(cards: ICard[]): this

addCardsToBottom

  • addCardsToBottom(cards: ICard[]): void

cardAtIndex

  • cardAtIndex(index: number): ICard

createHand

deal

  • deal(hand: IHand, size: number, frontOfHand?: boolean): this

getCards

getCount

  • getCount(): number

hasCard

  • hasCard(card: ICard): boolean

hasCards

  • hasCards(cards: ICard[]): boolean

indexOfCard

  • indexOfCard(card: ICard): number

isEmpty

  • isEmpty(): boolean

removeCards

  • removeCards(cards: ICard[]): this

setCards

  • setCards(cards: ICard[]): this

shuffle

  • shuffle(): void

takeCard

takeCardFromBottom

  • takeCardFromBottom(): ICard

takeCards

  • takeCards(amount: number): ICard[]

takeCardsFromBottom

  • takeCardsFromBottom(amount: number): ICard[]

Static Build

Static BuildFrom

Generated using TypeDoc