Skip to content

AcidicNic/Cards.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

license npm version

Cards.js

A deck of cards

Install

npm i @acidicnic/cards

Usage & Examples

// Import the package
const { Cards } = require('@acidicnic/cards');

// Creates new ordered deck
let cardDeck = new Cards();

// Shuffle deck
cardDeck.shuffle();

// View cards in deck
console.log(cardDeck._cards);

// Selects random card from deck
cardDeck.pickRandomCard();

// Draws card at the top of the deck and removes it form the deck.
cardDeck.drawTopCard();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors