Private
Public Access
1
0

Integrate direct WebSocket-based leaderboard functionality for real-time updates and requests. Refactor related client-side logic to utilize this new connection.

This commit is contained in:
Sebastian Unterschütz
2026-01-04 02:26:23 +01:00
parent 41d15c60d3
commit ce51a2ba4f
11 changed files with 192 additions and 39 deletions

View File

@@ -0,0 +1,17 @@
//go:build js && wasm
// +build js,wasm
package main
import (
"log"
"syscall/js"
)
// notifyGameStarted benachrichtigt JavaScript dass das Spiel startet
func (g *Game) notifyGameStarted() {
if startFunc := js.Global().Get("onGameStarted"); !startFunc.IsUndefined() {
startFunc.Invoke()
log.Println("🎮 Game Started - Benachrichtigung an JavaScript gesendet")
}
}