feat(ui): Websocket

Started implementing functionality to Websocket.
This commit is contained in:
LQ63
2025-11-26 01:35:46 +01:00
parent 52e5033afc
commit 0c2901bce0
17 changed files with 295 additions and 30 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)
}