From 5986e5b5848e2f49f016d1dd32d5fcf0526f791c Mon Sep 17 00:00:00 2001 From: "NBTEMP\\bib" Date: Sat, 12 Sep 2026 18:29:02 +0200 Subject: [PATCH] Busfahrer update 4 --- Casino/Busfahrer.xaml.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Casino/Busfahrer.xaml.cs b/Casino/Busfahrer.xaml.cs index 4a9c211..f3c17af 100644 --- a/Casino/Busfahrer.xaml.cs +++ b/Casino/Busfahrer.xaml.cs @@ -90,6 +90,7 @@ namespace Casino users = db.GetUser(); UpdateAccountDisplay(); + StartNewGame(); } @@ -111,7 +112,6 @@ namespace Casino // 1. Einsatz sofort auf dem Konto abziehen & in der Datenbank speichern - currentgeld -= Convert.ToInt32(currentBet); db.UpdateGeld(users[MainWindow.currentUser].ID, currentgeld); UpdateAccountDisplay(); @@ -238,6 +238,11 @@ namespace Casino bool ok = (chosenColor == CardColor.Red && targetCard.IsRed) || (chosenColor == CardColor.Black && !targetCard.IsRed); ProcessGuess(ok); + var currentUser = users[MainWindow.currentUser]; + currentBet -= Convert.ToInt32(TxtBet.Text); + db.UpdateGeld(currentUser.ID, currentUser.Geld); + UpdateAccountDisplay(); + } private void BtnHigher_Click(object sender, RoutedEventArgs e) => GuessHigherLower(true); @@ -338,6 +343,7 @@ namespace Casino { e.Handled = true; } + } private void TxtBet_Pasting(object sender, DataObjectPastingEventArgs e) @@ -351,5 +357,6 @@ namespace Casino } } } + } } \ No newline at end of file