This commit is contained in:
2026-09-13 15:59:13 +02:00
parent cf90775bad
commit 51f22f4155
2 changed files with 50 additions and 25 deletions
+29 -16
View File
@@ -157,25 +157,38 @@ namespace Casino
private void StartRound()
{
if (currentBet <= 0 || currentBet > CurrentUser.Geld)
try
{
ShowWaitingState();
return;
if (currentBet <= 0 || currentBet > CurrentUser.Geld)
{
ShowWaitingState();
return;
}
// Einsatz vom Konto abziehen
CurrentUser.Geld -= Convert.ToInt32(currentBet);
SaveAccount();
currentProfit = 0;
currentPhase = 0;
roundRunning = true;
TxtBet.IsEnabled = false;
LoadCards();
UpdateHandUI();
UpdateWinDisplay();
SetPhaseUI();
}
catch (NullReferenceException)
{
MessageBox.Show(
"Bitte ein Betrag eingeben",
"Fehlermeldung 101",
MessageBoxButton.OK,
MessageBoxImage.Information);
}
// Einsatz vom Konto abziehen
CurrentUser.Geld -= Convert.ToInt32(currentBet);
SaveAccount();
currentProfit = 0;
currentPhase = 0;
roundRunning = true;
TxtBet.IsEnabled = false;
LoadCards();
UpdateHandUI();
UpdateWinDisplay();
SetPhaseUI();
}
private void LoadCards()