Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
45ad602d9a
commit
a470d8984c
@ -224,9 +224,10 @@ final class GameState {
|
|||||||
return engine.canSurrender(hand: hand)
|
return engine.canSurrender(hand: hand)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the game is over (out of money and no active bet).
|
/// Whether the game is over (can't afford to meet minimum bet).
|
||||||
|
/// True when in betting phase and total available chips (balance + current bet) is less than minimum bet.
|
||||||
var isGameOver: Bool {
|
var isGameOver: Bool {
|
||||||
balance < settings.minBet && currentPhase == .betting && currentBet == 0
|
currentPhase == .betting && (balance + currentBet) < settings.minBet
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Total rounds played.
|
/// Total rounds played.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user