CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <iostream>
#include <random>
#include <ctime>
using namespace std;
/*
Name:Simple card shuffle
By: Michael Simnitt
Date:6/23/17
Purpose:Demonstrate a safe shuffle
*/
#define xfor(x) for(int n(0);n<x;n++)
int Deck[52][2]{0};
string suits[]=
{"Hearts","Spades",
"Clubs","Diamonds"};
string cards[]=
{"Ace","Two","Three","Four",
"Five","Six","Seven","Eight",
"Nine","Ten","Jack","Queen","King"};
//place all cards in deck
void buildDeck(){
int ctr(0),st(0);
xfor(4){ // each suit
st=n;
xfor(13){ // each card value
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run