kedoska / engine-blackjack

Javascript library to make blackjack engines
GNU General Public License v2.0
33 stars 29 forks source link

Available actions are balance dependents #46

Closed kedoska closed 5 years ago

kedoska commented 7 years ago

This is something I was trying to avoid since the beginning: considering limits or balance, but, available actions, considering that there is an initial amount in the game, should also consider the current available balance of the player. Of course, by implementing the engine it is possible to perform many other check according with the state of the customer (its balance, its limits etc) but ... actions are definitely wrong in some cases:

  1. balance is too low to double
  2. balance is too low to split
  3. balance is too low to perform insurance
  4. balance is too low on right or left after split to double

so, i think i should implement a value that represents the "current limit" of the user (unlimited by default) that if specified it will be considered to unlock actions.