Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void shuffle(int a) {
- int temp = 0, counter_deck = 0, counter_do_loop = 0, exchange_rand = 0, exchange_card = 0;
- for (counter_do_loop = 0; counter_do_loop < a; counter_do_loop++) {
- for (counter_deck = 0; counter_deck < 52; counter_deck++) {
- temp = cards[counter_deck];
- exchange_rand = (rand() % 52);
- exchange_card = cards[exchange_rand];
- cards[counter_deck] = cards[exchange_card];
- cards[exchange_card] = temp;
- }}
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment