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

Reviewed-on: #102
Reviewed-by: Phan Huy Tran <ptran@noreply.localhost>
This commit is contained in:
Jan K9f 2025-03-27 13:07:03 +00:00
commit 4b4de32e1d
2 changed files with 4 additions and 1 deletions

View file

@ -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;

View file

@ -2,5 +2,6 @@ package de.szut.casino.blackjack;
public enum BlackJackState {
PLAYER_WON,
IN_PROGRESS
IN_PROGRESS,
PLAYER_LOST,
}