View Single Post
Old 10-02-2012, 11:33 PM   PM User | #4
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,548
Thanks: 62
Thanked 4,054 Times in 4,023 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
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.
Old Pedant is online now   Reply With Quote