@acidicnic/cards
v0.1.1
Published
A deck of cards.
Downloads
8
Readme
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();