Fix EsLint config & update packages

This commit is contained in:
Ralex
2025-09-28 12:58:51 +02:00
parent dd841c813e
commit 89c39fac52
33 changed files with 2416 additions and 1641 deletions

View File

@@ -8,22 +8,24 @@ const Manager = {
createRoom: (game, io, socket, password) => {
if (game.password !== password) {
io.to(socket.id).emit("game:errorMessage", "Bad Password")
return
}
if (game.manager || game.room) {
io.to(socket.id).emit("game:errorMessage", "Already manager")
return
}
let roomInvite = generateRoomId()
const roomInvite = generateRoomId()
game.room = roomInvite
game.manager = socket.id
socket.join(roomInvite)
io.to(socket.id).emit("manager:inviteCode", roomInvite)
console.log("New room created: " + roomInvite)
console.log(`New room created: ${roomInvite}`)
},
kickPlayer: (game, io, socket, playerId) => {
@@ -75,7 +77,7 @@ const Manager = {
return
}
game.currentQuestion++
game.currentQuestion += 1
startRound(game, io, socket)
},
@@ -101,7 +103,9 @@ const Manager = {
},
})
// eslint-disable-next-line no-param-reassign
game = deepClone(GAME_STATE_INIT)
return
}