diff --git a/Casino/MainWindow.xaml.cs b/Casino/MainWindow.xaml.cs index 3509d65..299f6f4 100644 --- a/Casino/MainWindow.xaml.cs +++ b/Casino/MainWindow.xaml.cs @@ -31,7 +31,7 @@ namespace Casino private void Sound_Click(object sender, RoutedEventArgs e) { Database data = new Database(); - byte[] blobData = data.GetSound(1); + byte[] blobData = data.GetSound(2); var audioService = new Audioplayer(); audioService.PlayMusic(blobData); } diff --git a/Casino/Slots.xaml.cs b/Casino/Slots.xaml.cs index da31e4e..2ac3e80 100644 --- a/Casino/Slots.xaml.cs +++ b/Casino/Slots.xaml.cs @@ -75,14 +75,39 @@ namespace Casino users[MainWindow.currentUser].Geld += 100; for (int i = 0; i < 50; i++) { - foreach (var image in _bilder) + int[,] currentSlot = new int[6, 3]; + for (int j = 6; j<_bilder.Count;j--) { int randomBild = _random.Next(0, AlleBilder.Count); - LoadCard(image, randomBild); - } + if (i == 0) + { + currentSlot[0,j] = randomBild; + LoadCard(_bilder[j], randomBild); + } + else if (i == 1) + { + currentSlot[1, j] = currentSlot[0, j]; + LoadCard(_bilder[j + 6], currentSlot[0,j]); + currentSlot[0, j] = randomBild; + LoadCard(_bilder[j], randomBild); + } + else + { + currentSlot[1, j] = currentSlot[0, j]; + LoadCard(_bilder[j + 12], currentSlot[1, j]); + currentSlot[2, j] = currentSlot[1, j]; + LoadCard(_bilder[j + 6], currentSlot[0, j]); + currentSlot[0, j] = randomBild; + LoadCard(_bilder[j], randomBild); + } + await Task.Delay(70); + + + } await Task.Delay(70); + } }