librejack

Blackjack clone written in java
git clone https://github.com/michaelneuper/librejack.git
README | Files | Log | Refs | LICENSE

commit 6c89d383ab4fb41605d10a67e3be40198a6edf17
parent 4de91250839802374e3630bf515ec88da87ec494
Author: Michael Neuper <michael@michaelneuper.com>
Date:   Sat, 29 Apr 2023 23:20:43 +0200

Change win/lose messages

Diffstat:
Msrc/controller/Controller.java | 16++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/controller/Controller.java b/src/controller/Controller.java @@ -153,13 +153,13 @@ public class Controller { if (PLAYER.hasBlackjack()) { STATS.incrementPushes(); - return "You both have 21 - Push"; + return "PUSHED!"; } else { balance -= bet; PLAYER.setBalance(balance); STATS.incrementLosses(); DEALER.printHand(); - return "Dealer has BlackJack - You lose"; + return "LOST!"; } } @@ -169,7 +169,7 @@ public class Controller { PLAYER.setBalance(balance); STATS.incrementWins(); hasPlayed = true; - return "You have BlackJack - You win"; + return "WON!"; } // check whether player busted @@ -178,7 +178,7 @@ public class Controller { PLAYER.setBalance(balance); STATS.incrementLosses(); hasPlayed = true; - return "Busted"; + return "BUSTED!"; } // dealer's turn @@ -193,7 +193,7 @@ public class Controller { PLAYER.setBalance(balance); STATS.incrementWins(); hasPlayed = true; - return "Dealer busts - You win"; + return "WON!"; } if (DEALER.getHand().calculateValue() > PLAYER.getHand().calculateValue() @@ -202,7 +202,7 @@ public class Controller { PLAYER.setBalance(balance); STATS.incrementLosses(); hasPlayed = true; - return "You lose"; + return "LOST!"; } if (PLAYER.getHand().calculateValue() > DEALER.getHand().calculateValue()) { @@ -210,13 +210,13 @@ public class Controller { PLAYER.setBalance(balance); STATS.incrementWins(); hasPlayed = true; - return "You win"; + return "WON!"; } if (PLAYER.getHand().calculateValue() == DEALER.getHand().calculateValue()) { STATS.incrementPushes(); hasPlayed = true; - return "Push"; + return "PUSHED!"; } return null;