From a2d169520334c3c95f5d6f551e14d9bb8caf06b4 Mon Sep 17 00:00:00 2001 From: Nick Pegg Date: Fri, 4 Jul 2025 14:39:15 -0700 Subject: [PATCH] end game when out of money --- src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.rs b/src/main.rs index 15649f4..e13268f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -71,6 +71,11 @@ fn interactive_play() { } bank += result.player_winnings; + + if bank == 0 { + println!("You're out of money."); + return; + } } }