Closed funcdoor closed 6 years ago
hi @funcdoor,
the Game
cto needs 2 arguments:
constructor (initialState: State, rules: Rule = getRules({}))
Assuming the default settings returned by the function getRules()
is not what you want for your players, you can override the rules like this:
const { presets, actions, Game } = require('engine-blackjack')
const overrideRules = {
decks: 6
}
const rules = presets.getRules(overrideRules)
const game = new Game(null, rules)
const stateAfterDeal = game.dispatch(actions.deal({ bet: 100 }))
console.dir(stateAfterDeal)
Thanks very much, I got it working! I actually wanted to turn off "standOnSoft17"; I've found that "hit on soft 17" is the norm in Las Vegas tables.
I'm not sure what arguments to give to new Game() for things like standOnSoft17