import java.util.*;
class Hand {
static Card[] deck = new Card[52];
Card[] hand = new Card[10];
static int index;
public static void createDeck () {
int m = 0;
for (int j = 0; j < 4; j++) {
for (int k = 1; k < 14; k++) {
deck[m] = new Card(j,k);
m++;
}
}
index = 0;
} //end createDeck
public static Card deal () {
index++;
return deck[index-1];
} //end deal
public static int compareCard (Card c1, Card c2) {
if (c1.getSuit() > c2.getSuit()) return 1;
if (c1.getSuit() < c2.getSuit()) return -1;
if (c1.getRank() > c2.getRank()) return 1;
if (c1.getRank() < c2.getRank()) return -1;
return 0;
} //end compareCard
public void printDeck (int size) {
int j = 0;
while (j < size) {
deck[j].printCard();
j++;
}
}//end printDeck
public void shuffleDeck () {
Random randomNumber = new Random ();
for (int i =0; i < deck.length; i++) {
int randomInt = randomNumber.nextInt (53);
Card temp = hand [i];
hand[i] = hand [randomInt];
hand[randomInt] = temp;
}
}//end shuffleDeck
} //end class