|
@@ -69,7 +69,7 @@ public class BlackJack extends CardGame implements Gamble {
|
69
|
69
|
|
70
|
70
|
while (getSum(currentPlayer.getHand()) < 21) {
|
71
|
71
|
if (hitOrStand.equals("H")) {
|
72
|
|
- dealCards(currentPlayer, 1);
|
|
72
|
+ dealCard(currentPlayer,1);
|
73
|
73
|
} else if (hitOrStand.equals("S")) {
|
74
|
74
|
break;
|
75
|
75
|
} else {
|
|
@@ -112,6 +112,13 @@ public class BlackJack extends CardGame implements Gamble {
|
112
|
112
|
}
|
113
|
113
|
}
|
114
|
114
|
|
|
115
|
+ public void dealCard(BlackJackPlayer p, int numberOfCards) {
|
|
116
|
+ for (int i = 0; i < numberOfCards; i++) {
|
|
117
|
+ Card card = deck.removeFirst();
|
|
118
|
+ p.getHand().add(card);
|
|
119
|
+ }
|
|
120
|
+ }
|
|
121
|
+
|
115
|
122
|
public void placeBet() {
|
116
|
123
|
bet = Console.getLongInput("Please enter your bet.");
|
117
|
124
|
}
|