Shuffling DeckOfCards

So, I am considering my deck and the shuffling for the game "Thirty-One"
Currently, I have an array[4][13]. But now I am rethinking that, I am debating if I want to do something like:
boxedCards[4][13]
shuffledCards[4][13]

I would use my random to pull cards from the boxedCards and place them into the shuffledCards array. I could deal directly then one after the other, I guess I could even shuffle again if I wanted to.

Just wondering what your thoughts on this approach is...

Thank You all (in advance)
Something like this, perhaps:

1
2
3
4
5
6
7
8
const int NSUITS = 4 ;
const int NCARDS_PER_SUIT = 13 ;

// ordered: suit-wise, face-value-wise within each suit
Cards boxedCards[NSUITS][NCARDS_PER_SUIT] ;

// unordered: just a random sequence of the cards in the deck
Cards shuffledCards[NSUITS*NCARDS_PER_SUIT] ;


This should be of interest: http://en.cppreference.com/w/cpp/algorithm/random_shuffle
I like that ... it just makes more sense ( now that I think about it).
Thanks

I'll check that link out too ...
Topic archived. No new replies allowed.