Add leaderboard & Manager some features

This commit is contained in:
Ralex91
2024-01-31 23:27:52 +01:00
parent e122fe1078
commit 91c7644c71
11 changed files with 202 additions and 118 deletions

View File

@@ -28,6 +28,11 @@ const sleep = (sec) => new Promise((r) => setTimeout(r, sec * 1000))
export const startRound = async (game, io, socket) => {
const question = game.questions[game.currentQuestion]
io.to(game.room).emit("game:updateQuestion", {
current: game.currentQuestion + 1,
total: game.questions.length,
})
io.to(game.room).emit("game:status", {
name: "SHOW_QUESTION",
data: {