easy-blackjack
v1.0.1
Published
Play blackjack the easy way.
Downloads
23
Maintainers
Readme
Installation
npm i --save easy-blackjack
Docs
import { Blackjack } from 'easy-blackjack';
const game = new Blackjack();
// hit function
game.hit();
// stay function
game.stay();
game.dealerDeck; //IDeckCard[] { type: string, value: string }
game.playerDeck; //IDeckCard[]
game.dealerAceCount; // number
game.playerAceCount; // number
game.dealerSum; // number
game.playerSum; // number
game.deck; // IDeckCard[]
game.hidden; // IDeckCard --> hidden card
game.result; // undefined | IResultType
// 'BOTH_BUST' | 'PLAYER_WINS' | 'DEALER_WINS' | 'TIE'