feat(blackjack): add player lost state in game logic
All checks were successful
All checks were successful
This commit is contained in:
parent
d7690e630e
commit
e9a8267208
2 changed files with 4 additions and 1 deletions
|
@ -89,6 +89,8 @@ public class BlackJackService {
|
||||||
|
|
||||||
if (playerHandValue == 21) {
|
if (playerHandValue == 21) {
|
||||||
return BlackJackState.PLAYER_WON;
|
return BlackJackState.PLAYER_WON;
|
||||||
|
} else if (playerHandValue > 21) {
|
||||||
|
return BlackJackState.PLAYER_LOST;
|
||||||
}
|
}
|
||||||
|
|
||||||
return BlackJackState.IN_PROGRESS;
|
return BlackJackState.IN_PROGRESS;
|
||||||
|
|
|
@ -2,5 +2,6 @@ package de.szut.casino.blackjack;
|
||||||
|
|
||||||
public enum BlackJackState {
|
public enum BlackJackState {
|
||||||
PLAYER_WON,
|
PLAYER_WON,
|
||||||
IN_PROGRESS
|
IN_PROGRESS,
|
||||||
|
PLAYER_LOST,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue