Merge pull request 'feat(blackjack): add player lost state in game logic (CAS-51)' (!102) from update-state-on-hit into main
Some checks failed
Release / Release (push) Has been cancelled
Some checks failed
Release / Release (push) Has been cancelled
Reviewed-on: #102 Reviewed-by: Phan Huy Tran <ptran@noreply.localhost>
This commit is contained in:
commit
4b4de32e1d
2 changed files with 4 additions and 1 deletions
|
@ -89,6 +89,8 @@ public class BlackJackService {
|
|||
|
||||
if (playerHandValue == 21) {
|
||||
return BlackJackState.PLAYER_WON;
|
||||
} else if (playerHandValue > 21) {
|
||||
return BlackJackState.PLAYER_LOST;
|
||||
}
|
||||
|
||||
return BlackJackState.IN_PROGRESS;
|
||||
|
|
|
@ -2,5 +2,6 @@ package de.szut.casino.blackjack;
|
|||
|
||||
public enum BlackJackState {
|
||||
PLAYER_WON,
|
||||
IN_PROGRESS
|
||||
IN_PROGRESS,
|
||||
PLAYER_LOST,
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue