-
Notifications
You must be signed in to change notification settings - Fork 0
API
Predrag Stojadinović edited this page Aug 2, 2018
·
3 revisions
- new (cards)
- all () - returns array of these cards
- getPPN () - returns a PPN string representation
- toString () - returns a plain string representation
- toUnicodeString () - returns a Unicode string representation
- getOriginal () - returns the original constructed list of cards
- getOriginalPPN () - returns the original PPN string representation
- toOriginalString () - returns the original plain string representation
- toOriginalUnicodeString () - returns the original Unicode string representation
- new ()
- sort (config) - sort cards by config: e.g. {sorting: Pile.SORTING.SUITS, reversed: true}
- new ()
- validate (cards) - STATIC checks if the passed cards are a valid deck
- isValid () - checks if it is valid
- restore (cards) - restore desk from given cards
- cut () - cut the deck
- shuffle () - shuffle the deck
- deal () - deal to 3 players and talon
- new ()
- compare (c1, c2, trump) - STATIC compare two cards for trump
- beats (card, trump) - check if it beats given card for trump
- getters...
- value
- suit
- rank
- label
- ppn
- toString () - return cards two character representation
- toUnicodeString () - return cards value + unicode sign for suit
- all () - get all cards PPN representations
- ppn (label) - get PPN representation for label
- ppns (labels) - get PPN representations for labels
- card (ppn) - get a Card instance for given PPN representation
- cards (ppns) - get Card instances for given PPN representations
- rank (value) - get rank for value
- isValid (value) - check if the value is valid
- all () - get all ranks array
- suit (label) - get suit for label
- isValid (label) - check if the label is valid
- toUnicode (suit) - return unicode sign for suit
- all () - get all suits array
- value (label) - get value for label
- isValid (label) - check if the label is valid
- all () - get all values array