fix game
Dynamic Branch Deploy / build-and-deploy (push) Failing after 2m0s

This commit is contained in:
Sebastian Unterschütz committed 2026-04-22 11:38:35 +02:00
1 parent a6cfc055be
commit 2286c18432
5 files changed
+29 -7

No files matched your search

+5
View File
@@ -139,6 +139,7 @@ type Game struct {
// Highscore
localHighscore int
roundStartTime time.Time // Startzeit der aktuellen Runde (für Solo)
// Audio System
audio *AudioSystem
@@ -271,9 +272,13 @@ func (g *Game) Update() error {
}
if currentStatus == "RUNNING" && g.lastStatus != "RUNNING" {
g.audio.PlayMusic()
g.roundStartTime = time.Now()
}
if currentStatus == "GAMEOVER" && g.lastStatus == "RUNNING" {
g.audio.StopMusic()
if g.gameMode == "solo" {
g.verifyRoundResult()
}
}
g.lastStatus = currentStatus