diff --git a/sockets/socketLogic.js b/sockets/socketLogic.js index cbfa526ef82a843075aa7380a1a1afe48fbd1819..d07618f72ba51c2eb5993e8166f74fc0428eeb98 100644 --- a/sockets/socketLogic.js +++ b/sockets/socketLogic.js @@ -120,8 +120,9 @@ async function showQuestions(game, socket, questionNumber) { while (questionNumber < 10) { await showQuestion(); // Show the question await wait(15, socket, game.id, true); // Wait for 15 seconds - - // Send a new event to close the question + //TODO: Send a new event to close the question + socket.to(game.getGameId()).emit("closeQuestion"); + socket.emit("closeQuestion"); await wait(15, socket, game.id, false); // Wait for 15 more seconds questionNumber++; // Move to the next question }