Compare commits

...

2 commits

Author SHA1 Message Date
4b4de32e1d 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>
2025-03-27 13:07:03 +00:00
e9a8267208
feat(blackjack): add player lost state in game logic
All checks were successful
CI / Get Changed Files (pull_request) Successful in 8s
CI / eslint (pull_request) Has been skipped
CI / prettier (pull_request) Has been skipped
CI / test-build (pull_request) Has been skipped
CI / Checkstyle Main (pull_request) Successful in 1m1s
2025-03-27 14:03:33 +01:00
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,
}