| | |
Blackjack setting Ace value
![]() |
No, because in BlackJack (21) 10 - King are all 10 and an Ace is either 1 or 11.
I would say, when an Ace shows up, total the rest of the cards, then decide how much to assign to the Ace depending on the difference between the current total and 21.
I would say, when an Ace shows up, total the rest of the cards, then decide how much to assign to the Ace depending on the difference between the current total and 21.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
•
•
Join Date: Mar 2004
Posts: 762
Reputation:
Solved Threads: 38
Remove any Aces from your hand, sum up whats left and if that total is less than 11 then you can make the Ace worth 11 without busting.
Java Syntax (Toggle Plain Text)
if sum(cards-Ace) < 11 Ace = 11 else Ace = 1 endif
![]() |
Similar Threads
- help setting up web server (Linux Servers and Apache)
- Video setting question (Monitors, Displays and Video Cards)
- Setting up my PC as a web server (Windows NT / 2000 / XP)
Other Threads in the Java Forum
- Previous Thread: strings and encodings
- Next Thread: Array problem
| Thread Tools | Search this Thread |
account android applet application apps array automation awt bidirectional binary birt bluetooth businessintelligence busy_handler(null) card class classes client code collision columns component constructor database designadrawingapplicationusingjavajslider draw eclipse error eventlistener exception expand fractal free game givemetehcodez graphics gui guidancer homework html ide image inheritance integer integration intellij j2me java javafx javamicroeditionuseofmotionsensor javaprojects jlabel jme jni jpanel jtextfield jtree julia linux loop method midlethttpconnection migrate mobile mobiledevelopmentcreatejar monitoring myaggfun netbeans newbie nullpointerexception open-source oracle plazmic print problem program property ria scanner server set sharepoint smart sms smsspam sourcelabs splash sql sqlite subclass support swing testautomation textfield threads tree trolltech unlimited utility windows






