0.1.1 • Published 2 years ago

@acidicnic/cards v0.1.1

Weekly downloads
-
License
WTFPL
Repository
-
Last release
2 years ago

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();
0.1.1

2 years ago

0.1.0

2 years ago