kedoska / engine-blackjack

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

Noinsurance #5

Closed gsdriver closed 7 years ago

gsdriver commented 7 years ago

Added a new action for "noinsurance." When the dealer has an ace (if the insurance rule is set), then the player must first select either "insurance" or "noinsurance." After their selection, the dealer checks their hole card and the game ends if they have a 10. Also make sure that we give the player an opportunity to take insurance if they have a blackjack.

This also introduces a dealerHoleCard variable, which is dealt when the dealer hand is initially dealt. After showdown, the dealer will flip over this card and then hit from the deck if they need to keep hitting. This logic can be extended with "European no-peek" if the dealer has a 10 showing.

kedoska commented 7 years ago

@gsdriver

For the moment I want to leave the out the noinsurance but I reused your logic for dealerHoleCard witch was also implemented into the miniserver here the changes (the in master).