| | |
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: 763
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 |
android api applet application apps array arrays automation awt bidirectional binary birt bluetooth businessintelligence busy_handler(null) card chat class classes client code collision columns component constructor crashcourse database designadrawingapplicationusingjavajslider draw eclipse error errors eventlistener exception expand fractal game givemetehcodez graphics gui guidancer html ide image inetaddress integer intellij j2me java javafx javamicroeditionuseofmotionsensor javaprojects jme jni jpanel jtree julia linux list loop machine map method methods mobile mobiledevelopmentcreatejar myaggfun netbeans newbie oracle physics plazmic print problem program programming project recursion scanner server set sharepoint smart sms smsspam sort sortedmaps sql string subclass support swing textfield threads tree trolltech unlimited utility webservices windows






