This is eluding me and I don't know why, here's what I want to do...
I have this Baccarat simulater I'm trying to make - baccarat is very similar to blackjack so u can think of it that way if u wish.
I want to have my program shuffle decks of cards into shoes - for those that don't know - a SHOE in a casino is usually 6-8 full decks (52 cards ea.) that are randomly shuffled together and all cards are dealt outta that shoe. I want the user to be able to select the number of decks within the SHOE from 1 to max 8. -- I will also add an infinite shoe which is basically nothing more than a seeded rand() that determines the values of the cards drawn--.
I just can't get my hed around the design - I don't need help coding but attacking this problem. I was thinking...
1) using an array or enum to hold an index of the 52 cards in a deck. Or similarly, hold the suits/faces of the cards.
2) I need another array or vector to hold the actual cards - IE this is the SHOE
3) #PROBLEM# How do I shuffle this randomly efficiently, remember I can't use the same card twice (if I give each card an index value) or I can't use more than a certain number of Aces, Kings ( if I design to keep track of suits/faces)... If I use a rand() function how can I create it so that it says that since the value 57 has just been used it can't be used again this shuffle?
How do I avoid getting junk values from my rand() function is the basic jist of my question - I don't want to throw out generated values from rand() b/c it's already been used...
Pleeze help me understand how to acheive this ---