Jump to content
MakeWebGames

Help me test this


Decepti0n

Recommended Posts

Re: Help me test this

Warning: Invalid argument supplied for foreach() in /home/paim/public_html/blackjack.php on line 151

Dealer:

You: King - Total: 10

Warning: Invalid argument supplied for foreach() in /home/paim/public_html/blackjack.php on line 11

Link to comment
Share on other sites

Re: Help me test this

Well im not an expert on blackjack, but from what I could find, as a 'rule' to prevent cheating or whatever, the dealer always stands on 17, but less than that will continue hitting, and Ace's for the dealer automatically count as 11.

Link to comment
Share on other sites

Re: Help me test this

 

Well im not an expert on blackjack, but from what I could find, as a 'rule' to prevent cheating or whatever, the dealer always stands on 17, but less than that will continue hitting, and Ace's for the dealer automatically count as 11.

 

But the dealer didnt have 17, the dealer had 24.

And why even waste time programming blackjack if you're not going to make Aces work correctly?? There's plenty of working blackjack games available for sale if you're not going to do it right.

Link to comment
Share on other sites

Re: Help me test this

 

Dealer total: 24

(Ace, 3, 10)

Your total: 16

(9, 6, Ace)

You (presumably) stood on 16, the dealer had Ace and 3 (11+3 = 14). He hit (since it's under 17), and got a 10, busted, and you won. The Ace works correctly according to the way I programmed it (as best I could according to BJ rules), and if you read the topic, you'll notice the word 'test'.

Link to comment
Share on other sites

Re: Help me test this

friggin A, I suck at blackjack...

took me about 20 seconds to get down to -700

coding looks good. I can help ya make it so aces can count as either 1 or 11 for dealer (but I doubt you need the help)

I would imagine a simple if statement

if(dealer is about to go bust because over 21)

{

check to see if dealer has ace.

If he does, subtract 10 from his score

If not, hhe goes bust

}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...