Decepti0n Posted April 3, 2007 Share Posted April 3, 2007 http://www.decepti0n.com/blackjack.php So the cards all add up right, all the shit that should wins, wins, etc :D Btw, the HIDDEN shows the card just for testing (normally it'd be blank) Quote Link to comment Share on other sites More sharing options...
CraigF Posted April 3, 2007 Share Posted April 3, 2007 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 Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted April 3, 2007 Author Share Posted April 3, 2007 Re: Help me test this Do you know what your hand was? :\ Quote Link to comment Share on other sites More sharing options...
UCC Posted April 3, 2007 Share Posted April 3, 2007 Re: Help me test this Dealer stands on 17 Dealer total: 24 (Ace, 3, 10) Your total: 16 (9, 6, Ace) You won! Why does it say Dealer Stands on 17? Also, The Ace should count as 1 making the dealer's score 14. Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted April 3, 2007 Author Share Posted April 3, 2007 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. Quote Link to comment Share on other sites More sharing options...
CraigF Posted April 3, 2007 Share Posted April 3, 2007 Re: Help me test this Do you know what your hand was? :\ Sorry i dont know lol i just clicked random to find any errors for you Quote Link to comment Share on other sites More sharing options...
UCC Posted April 3, 2007 Share Posted April 3, 2007 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. Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted April 3, 2007 Author Share Posted April 3, 2007 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'. Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted April 4, 2007 Author Share Posted April 4, 2007 Re: Help me test this Updated, testing a total cash flow, and betting, but I don't think its working too perfect at the moment :( also added card images (only clubs) Quote Link to comment Share on other sites More sharing options...
seanybob Posted April 4, 2007 Share Posted April 4, 2007 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 } Quote Link to comment Share on other sites More sharing options...
hamster01 Posted April 4, 2007 Share Posted April 4, 2007 Re: Help me test this why is there such a thing as minus number? Current Cashflow: -300 Try this: if ($money <0){ print "You have no money!";} Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted April 4, 2007 Author Share Posted April 4, 2007 Re: Help me test this Because im testing Quote Link to comment Share on other sites More sharing options...
Ghetto Posted April 4, 2007 Share Posted April 4, 2007 Re: Help me test this When you draw it takes the $100 off aswell Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted April 4, 2007 Author Share Posted April 4, 2007 Re: Help me test this Yeah, the money thing is kinda iffy at the moment :| Quote Link to comment Share on other sites More sharing options...
hamster01 Posted April 4, 2007 Share Posted April 4, 2007 Re: Help me test this hmm.. try keeping the stuff in cookies setcookie(money,$money + 200, 60*60 + time()); Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted April 4, 2007 Author Share Posted April 4, 2007 Re: Help me test this Cashflow is kept in sessions, right now im re-doing the dealers Ace's Quote Link to comment Share on other sites More sharing options...
hamster01 Posted April 4, 2007 Share Posted April 4, 2007 Re: Help me test this ok.. Cookies is better for when you are gonna make it public(for large amout of peole) Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted April 4, 2007 Author Share Posted April 4, 2007 Re: Help me test this How? I can easily change my cookies Plus, they're already logged in (on a game), so it's either sessions or using the database (I didn't in that because, it's still testing :P) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.