Class: module:Deck

module:Deck()

new module:Deck()

Source:

Members

state :State

Type:
  • State
Source:

Methods

(inner) addCard(content, qualities)

Add a Card to the Deck.
Parameters:
Name Type Description
content string Text of card.
qualities Array Array of Expressions.
Source:

(inner) draw(size) → {Array}

Draw card from Deck.
Parameters:
Name Type Description
size number Size of hand to draw from Deck.
Source:
Returns:
Hand of cards.
Type
Array

(inner) removeCard(c)

Remove a Card from the Deck.
Parameters:
Name Type Description
c object Card to remove from deck.
Source:

(inner) shuffle()

Shuffle cards in Deck.
Source:

(inner) size() → {number}

Size of Deck.
Source:
Returns:
Returns number of cards.
Type
number

(inner) updateCard(c)

Update card based on its internal hash.
Parameters:
Name Type Description
c Card Card to update in deck.
Source: