Hey so I need a little help. I am currently working on a program. I need to make a couple of functions. One will initialize the deck back to its in order state (i.e. 0-51) One will shuffle the deck and put them in random order. And the last one will deal a card to the player and remove the card dealt from the deck until the deck has no more cards, and then it will shuffle the deck again. I need to use arrays, but I am not sure how to create a random function that will store the random cards and take cards from the deck! Thanks guys!
Unfortunately, I have tried to create a design, however, I don't necessarily know how and where to start. I can create the standard deck, but I'm not sure how to store the random numbers and remove the cards until they are all gone. That's where I'm stumped! Thanks!
Well the deck can be randomised in many ways. One way would be by selecting cards from an array representing the ordered dealing deck and as a card is dealt and placed in the shuffled deck array sequentially its value in the dealing deck is changed from a 1 to zero. The opposite occurs in the shuffled deck.