Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CardPile

Extending the basic CardCollection, this class supports dealing with cards in an ordered pile. As such, interacting with the pile from the bottom is supported by using this class.

Hierarchy

Implements

Index

Constructors

constructor

Properties

name

name: string = "Pile"

Methods

addCard

  • addCard(card: ICard): this

addCards

  • addCards(cards: ICard[]): this

addCardsToBottom

  • addCardsToBottom(cards: ICard[]): void

cardAtIndex

  • cardAtIndex(index: number): ICard

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[]

Generated using TypeDoc