Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
confused over something simple
I got bored so I decided to make a blackjack game... it turned out to be more frustrating than anything else... I want to determine what card gets put down where...
intPlayer2 = Int((52 * Rnd) + 1)
Loop Until (intPlayer2 <> intPlayer1 Or intDealer2 Or intDealer1)
unfortunately what is happening is I get one of the dealers cards that appears both in his hand and my own. I dont want this, so i figured id put the code above in and try to see if I could fix it by preventing the random number from being drawn twice. It still occurs. Could anyone tell me whats wrong (i dont know if maybe i didnt put the parenthesis in the right place or what) the rest of the code seems to be fine and the dealers first two cards are never the same (i ran it about 100 times to check).
0 · ·