Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I tried -_-"
#5
Horusmaster Wrote:and after that cards[iRandomNum]=0 meaning you mark that number=0, after a few rounds all 52 cards are taken. So your program will go through an infinite loop of trying to generate a number that's not taken, but it never will.

and also, the player will never lose because this will never happen:
if(dealerHand <= 21 && dealerHand> 21)

WOOPS LMAO. I mean to make it
if(dealerHand <= 21 && dealerHand> hand)

I'm glad you caught that XD

Edit- It's actually just C, not C++
Reply


Messages In This Thread
I tried -_-" - by DrRusty - 2009-12-10, 05:19 PM
I tried -_-" - by Horusmaster - 2009-12-10, 07:07 PM
I tried -_-" - by DrRusty - 2009-12-10, 07:09 PM
I tried -_-" - by Horusmaster - 2009-12-10, 07:12 PM
I tried -_-" - by DrRusty - 2009-12-10, 07:14 PM
I tried -_-" - by XTOTHEL - 2009-12-10, 09:49 PM
I tried -_-" - by DrRusty - 2009-12-10, 10:35 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)