|
You have no protection in your code to stop the system from, for example, dealing 7 aces of spades in a row.
You need to create a full deck (including suits) and then decide on how many decks the dealer will deal from (nobody in Nevada deals from one deck...typically there are 4 or more decks in the "shoe").
I agree that RndMe's code is more complex than you probably need/are looking for, but yours is way too simplistic.
Just as a for instance: If somebody has an Ace and a 6 (for 17 points) and draws a 7, will you be smart enough to convert the Ace to 1 point and make the total now by 14, instead of 24?
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
|