From 5069e43993c51c5a3a5fb5a88e72fcf5591bcdaf Mon Sep 17 00:00:00 2001 From: "NBTEMP\\bib" Date: Sat, 12 Sep 2026 16:22:50 +0200 Subject: [PATCH] Slots System Fertig gestellt --- Casino/Database.cs | 4 +- Casino/Slot System.cs | 44 ---------- Casino/Slots.xaml | 2 + Casino/Slots.xaml.cs | 193 ++++++++++++++++++++++++++++++++++++++++-- Casino/User.cs | 2 +- 5 files changed, 193 insertions(+), 52 deletions(-) delete mode 100644 Casino/Slot System.cs diff --git a/Casino/Database.cs b/Casino/Database.cs index 0457be9..51253d1 100644 --- a/Casino/Database.cs +++ b/Casino/Database.cs @@ -104,14 +104,14 @@ namespace Casino return soundBytes; } - public void UpdateGeld(string id, int geld) + public void UpdateGeld(string id, decimal geld) { using (MySqlConnection conn = new MySqlConnection(myConnectionString)) { conn.Open(); using (MySqlCommand cmd = new MySqlCommand( - "UPDATE Users SET Geld = @geld WHERE id = @id", conn)) + "UPDATE Nutzer SET Geld = @geld WHERE id = @id", conn)) { cmd.Parameters.AddWithValue("@geld", geld); cmd.Parameters.AddWithValue("@id", id); diff --git a/Casino/Slot System.cs b/Casino/Slot System.cs deleted file mode 100644 index 0cf6c52..0000000 --- a/Casino/Slot System.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.CodeDom.Compiler; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Casino -{ - public class Slot_System - { - int[,] slots = new int[3, 6]; - bool fertig = false; - - public bool getFertig () { return fertig; } - - public async Task roll() - { - int counter =0; - while (counter<15) { - for (int i = 0; i < slots.GetLength(1); i++) - { - slots[2, i] = slots[1, i]; - slots[1, i] = slots[0, i]; - slots[0, i] = randomize(); - - } - counter++; - await Task.Delay(1000); - } - fertig = true; - } - - - - private int randomize() - { - Random ran = new Random(); - int temp = ran.Next(2, 11); - - return 0; - } - } -} diff --git a/Casino/Slots.xaml b/Casino/Slots.xaml index 791afcf..0dd8206 100644 --- a/Casino/Slots.xaml +++ b/Casino/Slots.xaml @@ -63,6 +63,8 @@