kommentare busfahrer
This commit is contained in:
+14
-14
@@ -41,6 +41,7 @@ namespace Casino
|
||||
}
|
||||
}
|
||||
//Colin Langer
|
||||
//verwandelt den textwert in punktwert um
|
||||
private static int ParseValue(string wert)
|
||||
{
|
||||
return wert.Trim() switch
|
||||
@@ -53,6 +54,7 @@ namespace Casino
|
||||
};
|
||||
}
|
||||
//Colin Langer
|
||||
//konvertiert das Bild von der Datenbank um
|
||||
private static BitmapImage ByteArrayToImage(byte[] bytes)
|
||||
{
|
||||
BitmapImage image = new BitmapImage();
|
||||
@@ -119,7 +121,7 @@ namespace Casino
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//Prüfen die eingabe
|
||||
if (!int.TryParse(TxtBet.Text, out int bet) || bet <= 0)
|
||||
{
|
||||
MessageBox.Show(
|
||||
@@ -156,7 +158,6 @@ namespace Casino
|
||||
return;
|
||||
}
|
||||
|
||||
// Einsatz vom Konto abziehen
|
||||
CurrentUser.Geld -= Convert.ToInt32(currentBet);
|
||||
SaveAccount();
|
||||
|
||||
@@ -182,6 +183,7 @@ namespace Casino
|
||||
|
||||
}
|
||||
//Colin Langer
|
||||
// lädt und mischt die karten aus der datenbank
|
||||
private void LoadCards()
|
||||
{
|
||||
deck = db.GetAllCards()
|
||||
@@ -203,6 +205,7 @@ namespace Casino
|
||||
}
|
||||
}
|
||||
//Colin Langer
|
||||
// nimmt die oberste karte
|
||||
private Card DrawCard()
|
||||
{
|
||||
Card card = deck[0];
|
||||
@@ -210,10 +213,8 @@ namespace Casino
|
||||
return card;
|
||||
}
|
||||
|
||||
// =========================
|
||||
// KARTEN ANZEIGEN
|
||||
// =========================
|
||||
//Colin Langer
|
||||
|
||||
private void UpdateHandUI()
|
||||
{
|
||||
Bild_1.Source = cardBackImage;
|
||||
@@ -246,7 +247,8 @@ namespace Casino
|
||||
Bild_4.Source = handCards[3].Image;
|
||||
}
|
||||
}
|
||||
|
||||
//Colin Langer
|
||||
// dreht die karten je nach runde um
|
||||
private void RevealCurrentCard()
|
||||
{
|
||||
if (handCards.Count < 4)
|
||||
@@ -274,9 +276,6 @@ namespace Casino
|
||||
}
|
||||
}
|
||||
|
||||
// =========================
|
||||
// SPIELLOGIK
|
||||
// =========================
|
||||
// Lenard Gerdes
|
||||
private async Task ProcessGuessAsync(bool success)
|
||||
{
|
||||
@@ -349,6 +348,7 @@ namespace Casino
|
||||
};
|
||||
}
|
||||
//Colin Langer
|
||||
// passt die buttons an je nach runde
|
||||
private async void ColorButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is not Button button)
|
||||
@@ -482,10 +482,8 @@ namespace Casino
|
||||
SaveAccount();
|
||||
}
|
||||
|
||||
// =========================
|
||||
// UI
|
||||
// =========================
|
||||
//Colin Langer
|
||||
// blendet die buttons der jewaligen runde ein
|
||||
private void SetPhaseUI()
|
||||
{
|
||||
PanelRedBlack.Visibility = Visibility.Collapsed;
|
||||
@@ -524,6 +522,7 @@ namespace Casino
|
||||
}
|
||||
}
|
||||
//Colin Langer
|
||||
// wartet kurz falls ein neuer einsatz eingegeben wird
|
||||
private void ShowWaitingState()
|
||||
{
|
||||
roundRunning = false;
|
||||
@@ -548,6 +547,7 @@ namespace Casino
|
||||
Close();
|
||||
}
|
||||
//Colin Langer
|
||||
// verwandelt das bild aus der datenbank um in eine bild für die oberfläche
|
||||
private static BitmapImage ByteArrayToImage(byte[] bytes)
|
||||
{
|
||||
BitmapImage image = new BitmapImage();
|
||||
@@ -565,9 +565,9 @@ namespace Casino
|
||||
}
|
||||
|
||||
// =========================
|
||||
// EINSATZfeld Colin Langer
|
||||
// EINSATZFELD Colin Langer
|
||||
// =========================
|
||||
|
||||
// In Slots ist die erklärung drin
|
||||
|
||||
private static readonly Regex NumberRegex = new Regex("^[0-9]+$");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user