deck-js

1.1.0 • Public • Published

deck

codecov.io Build Status

A very simple playing card deck implementation in js

usage

const Deck = require('deck-js').Deck;
const Card = require('deck-js').Card;
 
let deck = new Deck();
 
while(deck.length() > 0) {
    let card = deck.draw();
    console.log(card.getValue());
}
 
deck.reset() //Resets the deck
deck.shuffle() //Shuffles all cards remaining in deck
 
let card = new Card('2', 'H');
 
card.getRank() //'2'
card.getSuit() //'H'
card.getValue //'2 of Hearts'

license

u do you, imma do me

Readme

Keywords

none

Package Sidebar

Install

npm i deck-js

Weekly Downloads

1

Version

1.1.0

License

ISC

Last publish

Collaborators

  • dmamills