示例#1
0
文件: Deck.java 项目: nhiggins31/Lab3
 public Deck(int numberOfJokers, ArrayList<Card> Wilds) {
   this(numberOfJokers);
   for (Card dCard : cards) {
     for (Card wCard : Wilds) {
       if (dCard.getSuit() == wCard.getSuit() && dCard.getRank() == wCard.getRank()) {
         dCard.setWild();
       }
     }
   }
 }
示例#2
0
  public Deck(int NbrOfJokers, ArrayList<Card> WildCards) {

    this(NbrOfJokers); // Calls Single_Arg Constructor Deck(NbrOfJokers)

    for (Card deckCard : cards) {
      for (Card WildCard : WildCards) {
        if ((deckCard.getSuit() == WildCard.getSuit())
            && (deckCard.getRank() == WildCard.getRank())) {
          deckCard.setWild();
        }
      }
    }
    ShuffleCards();
  }