card_deck
v1.0.7
Published
Few functionalities related to card games like Shuffle, Clone, Draw
Downloads
2
Readme
Card-Deck
Here is few basic functionality for a card game like shuffle, draw etc
Installation
npm install card_deck --save
Usage
const Deck = require('card_deck');
let deck = new Deck();
Shuffle
var newDeck = deck.shuffle(); // It will return an array of 52 cards (shuffled)
Draw(count)
var draw = deck.draw(5); // It will return 5 random card from the existing deck.
Add Deck
var newDeck = deck.add(3); // It will return 52 * 3 shuffled cards.
Left Cards
var leftOutCards = deck.left(); // Get left out cards after draw