Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

blackjack-engine

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blackjack-engine - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

package.json
{
"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;
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc