Compare commits
3
Commits
836f8d6f89
...
705f6b4dba
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
705f6b4dba | ||
|
|
65b633dcb1 | ||
|
|
bce2f51a7b |
@@ -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);
|
||||
}
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@
|
||||
|
||||
<Button Content="Spin" HorizontalAlignment="Center" Grid.Row="4" Grid.Column="0" Height="50" Width="100" Click="Spin" Margin="0,100,0,0" Background="DarkRed" Foreground="Silver"/>
|
||||
<Button Grid.Row="0" Content="Hauptmenü" HorizontalAlignment="Center" Click="Hauptmenue" Width="100" Height="50"/>
|
||||
<TextBlock x:Name="Konto" Grid.Column="12" Grid.Row="4" Height="30" Width="100" Margin="0,100,0,0" Background="DarkRed" Foreground="Silver" TextAlignment="Right" FontSize="25"/>
|
||||
<TextBlock x:Name="Konto" Grid.Column="12" Grid.Row="4" Height="30" Width="100" Margin="0,100,0,0" Background="DarkRed" Foreground="Silver" TextAlignment="Right" FontSize="25" Text="{Binding Path=Geld}"/>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
+31
-4
@@ -72,23 +72,50 @@ namespace Casino
|
||||
}
|
||||
private async Task Spin()
|
||||
{
|
||||
int[,] currentSlot = new int[3, 6];
|
||||
users[MainWindow.currentUser].Geld += 100;
|
||||
for (int i = 0; i < 50; i++)
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
foreach (var image in _bilder)
|
||||
|
||||
for (int j = 5; j>=0;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[2, j] = currentSlot[1, j];
|
||||
LoadCard(_bilder[j + 12], currentSlot[1, j]);
|
||||
currentSlot[1, j] = currentSlot[0, j];
|
||||
LoadCard(_bilder[j + 6], currentSlot[0, j]);
|
||||
currentSlot[0, j] = randomBild;
|
||||
LoadCard(_bilder[j], randomBild);
|
||||
}
|
||||
|
||||
await Task.Delay(70);
|
||||
|
||||
|
||||
}
|
||||
await Task.Delay(70);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private async void Spin(object sender, RoutedEventArgs e)
|
||||
{
|
||||
await Spin();
|
||||
users[MainWindow.currentUser].Geld++;
|
||||
}
|
||||
|
||||
private void Hauptmenue(object sender, RoutedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user