Skip to content

Commit

Permalink
add game status events
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Müller 🚀 <code@brauser.io>
  • Loading branch information
Flipez committed Jan 21, 2020
1 parent 9cf1814 commit b385027
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ func updateScore() {
func startGame() {
clearAll()
gameIsRunning = true
publish("game/status", "running", true)
publish("sound/play", "start", false)
updateScore()

Expand Down Expand Up @@ -238,6 +239,7 @@ func clearAll() {
goalHistory = []Goal{}
gameIsRunning = false

publish("game/status", "stopped", true)
publish("round/current", strconv.Itoa(currentRound()), true)

debug()
Expand Down

0 comments on commit b385027

Please sign in to comment.