Mimic a real deal

Just because it's fun.
This commit is contained in:
Dave Burke
2022-03-03 22:10:19 -06:00
parent c7e684a99a
commit 213f77678f

View File

@@ -56,12 +56,15 @@ public class Game {
}
}
for(Player player : players){
player.dealCard(deck.deal());
player.dealCard(deck.deal()); //TODO: This could be in a separate loop to more acurrately follow how a game would be dealt, I couldn't figure out of the BASIC version did it
// It doesn't *really* matter whether we deal two cards at once to each player
// or one card to each and then a second card to each, but this technically
// mimics the way a deal works in real life.
for(int i = 0; i < 2; i++){
for(Player player : players){
player.dealCard(deck.deal());
}
}
// Consider adding a Dealer class to track the dealer's hand and running total.
// Alternately, the dealer could just be a Player instance where currentBet=0 and is ignored.
LinkedList<Card> dealerHand = new LinkedList<>();