A model and implementation of a deck of cards in JavaSript.
- 52 cards in a deck
- 4 suits of values 2-10, Jack, Queen, King, Ace
- 1 suit/value diad per card
Made up of one suit/value pair.
Properties:
- Suit
- Color
- Symbol
- Value
- Clubs, black, ♣
- Diamonds, red, ◆
- Hearts, red, ♥
- Spades, black, ♠
Ascending order
- Ace
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- Jack
- Queen
- King
The set of 4 x 13
suit/value cards.
When you first open a deck, you’ll usually see the Jokers at the face, followed by the Spades and Diamonds in ascending order, then the Clubs and Hearts in descending order. At the very back or top of the deck, you’ll get a few ad cards...
- Spade values in Ascending order
- Diamond values in Ascending order
- Club values in Descending order
- Heart values in Descending order