Compare commits

...
2 Commits
Author SHA1 Message Date
PBG2H25ALA 539a79a262 merge 32 2026-09-19 10:29:15 +02:00
PBG2H25ALA a071b93d46 merge31 2026-09-19 10:26:56 +02:00
2 changed files with 33 additions and 10 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ namespace Casino
public Audioplayer() { shortplayer.MediaEnded += Player_MediaEnded; }
public void PlaySound(byte[] audioBlob)
public void PlaySound(byte[] audioBlob, int soundId)
{
if (audioBlob == null || audioBlob.Length == 0)
return;
+32 -9
View File
@@ -63,9 +63,9 @@ namespace Casino
AlleBilder = new List<Byte[]>
{
db.GetCardImage(2),db.GetCardImage(3),
db.GetCardImage(4),db.GetCardImage(5),
db.GetCardImage(4),/*db.GetCardImage(5),
db.GetCardImage(6),db.GetCardImage(7),
db.GetCardImage(8),db.GetCardImage(9), db.GetCardImage(10)
db.GetCardImage(8),db.GetCardImage(9), db.GetCardImage(10)*/
};
Konto.Text = users[MainWindow.currentUser].Geld.ToString();
@@ -185,7 +185,8 @@ namespace Casino
board[row, 2],
board[row, 3],
board[row, 4],
board[row, 5]);
board[row, 5]
);
}
@@ -198,7 +199,8 @@ namespace Casino
multiplikator += CheckLine(
board[0, col],
board[1, col],
board[2, col]);
board[2, col]
);
}
@@ -222,7 +224,9 @@ namespace Casino
if (xMuster)
{
multiplikator += X_MUSTER;
highestWin++;
// Sound-ID für X-Muster
highestWin = Math.Max(highestWin, 7);
}
@@ -253,7 +257,9 @@ namespace Casino
if (randGleich)
{
multiplikator += RAND;
highestWin++;
// Sound-ID für Rand
highestWin = Math.Max(highestWin, 8);
}
@@ -264,7 +270,9 @@ namespace Casino
if (randGleich && xMuster)
{
multiplikator += X_UND_RAND;
highestWin++;
// Sound-ID für X + Rand
highestWin = Math.Max(highestWin, 9);
}
@@ -294,6 +302,8 @@ namespace Casino
if (fullBoard)
{
multiplikator += FULLBOARD;
// Fullboard = Sound-ID 12
highestWin = 12;
}
@@ -315,7 +325,11 @@ namespace Casino
return einsatz * multiplikator;
}
// Lenard Gerdes
// =========================================================
// CHECK LINE
// =========================================================
private decimal CheckLine(params int[] werte)
{
if (werte.Length < 3)
@@ -377,9 +391,18 @@ namespace Casino
return gewinn;
}
// =========================================================
// WIN SOUND AUS DATENBANK
// =========================================================
void PlayWinSound()
{
audio.PlaySound(db.GetSound(bestSoundId));
bestSoundId = highestWin+1;
if (bestSoundId > 0)
audio.PlaySound(db.GetSound(bestSoundId), bestSoundId);
bestSoundId = 0; // fehlte komplett
highestWin = 5;
}