kedoska / engine-blackjack

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

if the "hi" value is over 21, make it equal to "lo" #51

Closed webpty closed 7 years ago

webpty commented 7 years ago

What kind of issue is this? "Bug" or "New Feature"

BUG: issue #47 regarding the 2 aces bug still sends a hi over 21

Actual behavior

the fix for #47 still outputs this:

playerValue: {
   hi: 22
   lo: 12
}

How can we reproduce it? From "Stage" -> "Action" -> Cards

To reproduce, you can use these cards:

'♥5 ♣1 ♥4 ♣9 ♠1 ♦5'

At this point we no longer need the 22, and the output could read:

playerValue: {
   hi: 12
   lo: 12
}