Class: Deck

Deck

new Deck()

The Deck class Should probably be subclassed to create the cards for the deck in the constructor
Source:

Extends

Methods

drawCard(isReplaced) → {Card}

Parameters:
Name Type Description
isReplaced Boolean Whether or not the card should be replaced at the bottom of the deck
Source:
Returns:
The card drawn from the deck
Type
Card

sendMessage(message) → {void}

Method to broadcast a message out to the other components
Parameters:
Name Type Description
message string Message to send
Inherited From:
Source:
Returns:
Type
void

shuffle() → {void}

Shuffle the deck in place
Source:
Returns:
Type
void

subscribe(callback) → {void}

Method to subscribe to messages
Parameters:
Name Type Description
callback func A callback method to pass the message to
Inherited From:
Source:
Returns:
Type
void