feat(ui): Websocket

Started implementing functionality to Websocket.
This commit is contained in:
LQ63
2025-11-26 01:35:46 +01:00
parent 576e5af87e
commit 37a509c232
14 changed files with 259 additions and 9 deletions

View File

@@ -4,4 +4,18 @@ function handlePlayCard(card, dog) {
function handleSkipDogLife(button) {
// TODO needs implementation
}
function startGame(gameId, userId, username, userpasswordhash, userinternalid) {
const userpayload = {
internalId: userinternalid,
id: userId,
name: username,
passwordHash: userpasswordhash
}
const payload = {
gameId: gameId,
user: userpayload
};
console.log("CLICKED START GAME, SENDING EVENT..." + payload)
sendEvent("Start Game", payload)
}