1.0.8 • Published 1 year ago

cardshoe v1.0.8

Weekly downloads
3
License
ISC
Repository
github
Last release
1 year ago

CardShoe

CardShoe is a node library written for casino game developers, who want to develop a card based game and are looking for a card shoe that will provide them with access to deal & shuffle the cards.

Git Repository

https://github.com/chetansu/cardshoe

Installation

CardShoe requires Node.js v4+ to run.

$ npm install -g cardshoe

Development

var card_shoe = require('cardshoe');

Once imported the library will create a 1 deck card shoe with 52 cards by default. for having more than 1 deck of cards

card_shoe.setDecks(2);  // CREATES 2 SETS OF CARDS
card_shoe.setDecks(3);  // CREATES 3 SETS OF CARDS
card_shoe.setDecks(n);  // CREATES n SETS OF CARDS

to pull cards use the following

card_shoe.draw(1)       // FOR DEALING 1 CARD - RETURNS ARRAY OF LENGTH 1
card_shoe.draw(2)       // FOR DEALING 2 CARDS - RETURNS ARRAY OF LENGTH 2
card_shoe.draw(n)       // FOR DEALING n CARDS - RETURNS ARRAY OF LENGTH n

to get the history of all cards dealt

card_shoe.getDealtCards()       // RETURNS ALL THE DEALT CARD INFO AS AN ARRAY

After the end of each game call the shuffle to reset the card_shoe with the predefined set of decks

card_shoe.shuffle();

Todos

  • Write Tests

License

ISC

Free Software, Hell Yeah!

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago