Deck Of Cards
If you wish to view the code only, check this page. You can click the links and it should open up in a notepad file.
//A deck for your amusement.
class Deck{
public static void main(String args[]){
int M=5;
int Hand1[];
int Hand2[];
String temp;
int One;
int Two;
String
Card[]={"AS","KS","QS","JS","10S","9S","8S","7S","6S","5S","4S","3S","2S",
"AH","KH","QH","JH","10H","9H","8H","7H","6H","5H","4H","3H","2H",
"AD","KD","QD","JD","10D","9D","8D","7D","6D","5D","4D","3D","2D",
"AC","KC","QC","JC","10C","9C","8C","7C","6C","5C","4C","3C","2C"
}
}
{
for(int c=0;c<50;c++)//Change to shuffle more times!!!
{
One = 1 + (int)(Math.random() * 51);
Two = 1 + (int)(Math.random() * 51);
temp=Card[One]; Card[One]=Card[Two]; Card[Two]=temp;
}
System.out.println(" ");
}