Update Manager

This commit is contained in:
Ralex91
2024-02-01 11:02:28 +01:00
parent 0a075e564a
commit 6838f04828
8 changed files with 89 additions and 27 deletions

View File

@@ -60,7 +60,7 @@ const Manager = {
showLoaderboard: (game, io, socket) => {
if (!game.questions[game.currentQuestion + 1]) {
io.to(game.room).emit("game:status", {
io.to(socket).emit("game:status", {
name: "FINISH",
data: {
winners: game.players.slice(0, 3).sort((a, b) => b.points - a.points),
@@ -71,7 +71,7 @@ const Manager = {
return
}
io.to(game.room).emit("game:status", {
io.to(socket.id).emit("game:status", {
name: "SHOW_LEADERBOARD",
data: {
leaderboard: game.players