easy-blackjack
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

easy-blackjack

Developed with ❤️ by Swôth

npm npm

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'

easy-blackjack is licensed under the MIT License.

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i easy-blackjack

    Weekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    15.9 kB

    Total Files

    40

    Last publish

    Collaborators

    • swoth