示例#1
0
 // updates value of hand and determines softness
 public void addCard(Card newCard) {
   cards.add(newCard);
   value += newCard.getValue();
   if (!soft) {
     if (newCard.getRank() == 1) {
       if (value <= 11) {
         soft = true;
       }
     }
   } else {
     if (value > 11) {
       soft = false;
     }
   }
 }
示例#2
0
 public void addtoDeck(Card card) {
   System.out.println(this.getPlayerName() + "deckAdded" + card.getValue());
   this.hand.addCard(card);
 }