Southperry.net
I tried -_-" - Printable Version

+- Southperry.net (https://www.southperry.net)
+-- Forum: Social (https://www.southperry.net/forumdisplay.php?fid=14)
+--- Forum: Rubik's Cube (https://www.southperry.net/forumdisplay.php?fid=58)
+--- Thread: I tried -_-" (/showthread.php?tid=20241)



I tried -_-" - DrRusty - 2009-12-10




I tried -_-" - Horusmaster - 2009-12-10

The problem is that you didn't use a new deck of card each time during the new game.

so your takeCard function will repeatly generate the numbers that's already taken (control=0)


I tried -_-" - DrRusty - 2009-12-10




I tried -_-" - Horusmaster - 2009-12-10




I tried -_-" - DrRusty - 2009-12-10

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++


I tried -_-" - XTOTHEL - 2009-12-10




I tried -_-" - DrRusty - 2009-12-10

we never got to learning about object