feat(ui): Websocket
Started implementing functionality to Websocket.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user