Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Hand

Represents a group of cards assigned to an IPlayer

Hierarchy

Implements

Index

Constructors

constructor

Properties

name

name: string = "Hand"

suitOrder

suitOrder: Suit[] = [Suit.Clubs, Suit.Spades, Suit.Diamonds, Suit.Hearts]

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

playCard

  • playCard(card: ICard): void

removeCards

  • removeCards(cards: ICard[]): this

setCards

  • setCards(cards: ICard[]): this

shuffle

  • shuffle(): void

sortCards

takeCard

takeCardFromBottom

  • takeCardFromBottom(): ICard

takeCards

  • takeCards(amount: number): ICard[]

takeCardsFromBottom

  • takeCardsFromBottom(amount: number): ICard[]

Generated using TypeDoc