我对 52 张非小丑牌使用了以下代码
/**
the Card class
*/
public class Card
{
private int suit;
private int rank;
private String[] suits = {"Spades", "Hearts", "Clubs", "Dimonds"};
private String[] ranks = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King"};
public Card (int suit, int rank)
{
this.suit = suit;
this.rank = rank;
}
public String toString()
{
return ranks[rank] + " of " + suits[suit];
}//end toString()
public int getRank()
{
return rank;
}
public int getSuit()
{
return suit;
}
}//end Card class
我怎么能把两个小丑加进去?