示例#1
0
 public int getNumSuit(int suit, int trumpnumber) {
   int numsuit = 0;
   for (Card card : this.cards) {
     if (card.getSuit() == suit && card.getNumber() != trumpnumber) numsuit++;
   }
   return numsuit;
 }
示例#2
0
 public int getNumTrump(int trumpsuit, int trumpnumber) {
   int trump = 0;
   for (Card card : this.cards) {
     if (card.getSuit() == trumpsuit
         || card.getSuit() == Card.TRUMP
         || card.getNumber() == trumpnumber) trump++;
   }
   return trump;
 }