real-deal-deck-of-cards
A deck of cards.
Shuffle up and deal. This package is an object oriented approach to creating a deck of cards (no jokers) that can be used in any card game.
Includes unit tests via mocha.
Usage
var realDealDeckOfCards = let deck = realDealDeckOfCards;let next = deck;console; deck;next = deck;let count = 1;console; while next = deck count++;console;
outputs
Suit: SPADES , Name: Ace , Value: 1
Suit: DIAMONDS , Name: Two , Value: 2
Done - 52 cards!
Install
With npm installed, run
$ npm install real-deal-deck-of-cards
License
ISC