Skip to content

Commit

Permalink
Fixed issue ucsb-cs56-projects#52, made progress in issue ucsb-cs56-p…
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtsu committed Nov 9, 2016
1 parent 070f17a commit 9b892e0
Show file tree
Hide file tree
Showing 4 changed files with 221 additions and 129 deletions.
Binary file modified dist/cs56_W13_blackjack.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions src/edu/ucsb/cs56/projects/game/blackjack/Blackjack.java
Original file line number Diff line number Diff line change
Expand Up @@ -349,14 +349,14 @@ else if(player.hasBlackjack()) // if player has a blackjack, player wins
return 'P';
else if (dealer.getNumberOfCards() == 5) // if dealer has a 5 card charlie, dealer wins
return 'D';
else if (player.getNumberOfCards() == 5) // if player has a 5 card charlie, player wins
else if (player.getNumberOfCards() == 5 || player.getNumberOfCards2() == 5) // if player has a 5 card charlie, player wins. checks both hands if split.
return 'P';
else if(dealer.getSecondHandValue() >=
player.getSecondHandValue() &&
dealer.getSecondHandValue() >=
player.getHandValue())
player.getHandValue()) //in the case of an Ace
return 'D';
else if(dealer.getHandValue() >= player.getSecondHandValue() && dealer.getHandValue() >= player.getHandValue())
else if(dealer.getHandValue() >= player.getSecondHandValue() && dealer.getHandValue() >= player.getHandValue()) //in the case of an Ace
return 'D';
else
return 'P';
Expand Down
Loading

0 comments on commit 9b892e0

Please sign in to comment.