You are on page 1of 1

#include <stdlib.

h>
#include <time.h>
#include "Karte.h"

void shuffle(KARTE *deck) {


srand(time(NULL));
int i=0,k=0,platz=0;
KARTE temp;
do{
k = (int)(rand());
}while (k<5000);
for (i; i < k; i++) {
platz =(int)(rand())%52;
temp = deck[i % 52];
deck[i % 52] = deck[platz];
deck[platz] = temp;
}

You might also like