blackjack-engine
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "blackjack-engine", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "NodeJs, multi-player, blackjack engine", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -493,3 +493,3 @@ import * as TYPES from './constants' | ||
const { players } = this.state | ||
let hasPlayerUnderDecision = players.some(player => !!player.sideBetWins.insurance) //if insurance is not set, then decision hasn't made | ||
let hasPlayerUnderDecision = players.some(player => player.sideBetWins.insurance === undefined) //if insurance is not set, then decision hasn't made | ||
if (hasPlayerUnderDecision) { | ||
@@ -522,3 +522,3 @@ return { name: 'STAGE_INSURANCE' } | ||
} | ||
if (!gotNextPlayer || playerId === players.length) { | ||
if (!gotNextPlayer) { | ||
return { name: 'STAGE_SHOWDOWN' } | ||
@@ -525,0 +525,0 @@ } else { |
import { shuffle, newDecks } from '52-deck' | ||
import { SideBets, Rule, State, Player } from '../types' | ||
export const getDefaultSideBets = (active: boolean = false) : SideBets => { | ||
export const getDefaultSideBets = (active: boolean = true) : SideBets => { | ||
return { | ||
@@ -6,0 +6,0 @@ luckyLucky: active, |
@@ -172,7 +172,7 @@ export interface Action { | ||
export namespace actions { | ||
function bet(bet: number, playerId: number, sideBets?: SideBetsInfo): Action; | ||
function bet({bet, playerId, sideBets}: {bet: number, playerId: number, sideBets?: SideBetsInfo}): Action; | ||
// function dealCards | ||
// function dealerHit(options?: { dealerHoleCard: Card }): Action; | ||
function hit(): Action; | ||
function insurance(bet: number, playerId: number): Action; | ||
function insurance({bet, playerId}: {bet: number, playerId: number}): Action; | ||
// function invalid(action: Action, info: string): Action; | ||
@@ -244,5 +244,4 @@ function restore(): Action; | ||
function defaultState(rules: Rule): State; | ||
function getRules(): Rule; | ||
function getDefaultRules(): Rule; | ||
function defaultPlayer(): Player; | ||
function defaultPlayer(name?: string): Player; | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
92904
1404