Skip to content

Here is few basic functionality for a card game like shuffle, draw etc

Notifications You must be signed in to change notification settings

vikash5472/card_deck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Here is few basic functionality for a card game like shuffle, draw etc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published