944,111 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 3212
  • Java RSS
Apr 24th, 2007
0

Blackjack setting Ace value

Expand Post »
hi freinds,
Plz help me how to set the value of ace in Blackjack game.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tripuraneni is offline Offline
1 posts
since Apr 2007
Apr 24th, 2007
0

Re: Blackjack setting Ace value

Wouldn't you just set the value to one higher then King e.g. King = 13, Ace = 14.
Last edited by Cerberus; Apr 24th, 2007 at 6:23 am.
Reputation Points: 27
Solved Threads: 14
Junior Poster
Cerberus is offline Offline
162 posts
since Sep 2006
Apr 24th, 2007
0

Re: 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.
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Apr 25th, 2007
0

Re: Blackjack setting Ace value

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)
  1. if sum(cards-Ace) < 11
  2. Ace = 11
  3. else
  4. Ace = 1
  5. endif
Reputation Points: 92
Solved Threads: 51
Practically a Posting Shark
Phaelax is offline Offline
856 posts
since Mar 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: strings and encodings
Next Thread in Java Forum Timeline: Array problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC