From 08269639606c0481037cbde7ebaf2e0455460883 Mon Sep 17 00:00:00 2001 From: salmonik Date: Thu, 29 Oct 2026 18:43:09 +0100 Subject: v2.2.1: forfeit blackjack bets when leaving or disconnecting --- src/client/games/blackjack.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/client/games') diff --git a/src/client/games/blackjack.rs b/src/client/games/blackjack.rs index a34eb63..bad1781 100644 --- a/src/client/games/blackjack.rs +++ b/src/client/games/blackjack.rs @@ -38,6 +38,7 @@ impl BlackjackGame { "push" => "Push. Bet returned.".to_string(), "lose" => "Dealer wins.".to_string(), "bust" => "Bust.".to_string(), + "forfeit" => "Forfeited. Bet lost.".to_string(), "cancelled" => "Cancelled.".to_string(), _ => "Hand complete.".to_string(), } @@ -85,15 +86,15 @@ impl Game for BlackjackGame { } } "dealing" => "Dealing...".to_string(), - "cancelling" => "Cancelling...".to_string(), + "forfeiting" => "Forfeiting...".to_string(), "done" => Self::result_text(&hand.result, hand.winnings), _ => "Press [SPACE] to deal.".to_string(), }; let controls = if status == "player" { if hand.actions.iter().any(|action| action == "double") { - "[H]it [S]tand [D]ouble [Q]uit".to_string() + "[H]it [S]tand [D]ouble [Q] Forfeit".to_string() } else { - "[H]it [S]tand [Q]uit".to_string() + "[H]it [S]tand [Q] Forfeit".to_string() } } else { "[SPACE] New hand [+/-] Bet [Q] Quit".to_string() @@ -142,7 +143,7 @@ impl Game for BlackjackGame { D - double (when available)\n\ SPACE - deal a new hand\n\ +/- - change the next hand's bet\n\ - Q - leave the table" + Q - forfeit an active hand (bet is lost), or leave when no hand is active" .to_string() } } -- cgit v1.2.3