mirror of
https://github.com/randyjc/Rahoot.git
synced 2026-03-13 20:15:35 +01:00
Add Manager Skip button on quiz
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { GAME_STATE_INIT } from "../quizz.config.js"
|
||||
import { startRound } from "../utils/round.js"
|
||||
import generateRoomId from "../utils/generateRoomId.js"
|
||||
import { cooldown, sleep } from "../utils/cooldown.js"
|
||||
import { abortCooldown, cooldown, sleep } from "../utils/cooldown.js"
|
||||
import deepClone from "../utils/deepClone.js"
|
||||
|
||||
const Manager = {
|
||||
@@ -77,6 +77,18 @@ const Manager = {
|
||||
startRound(game, io, socket)
|
||||
},
|
||||
|
||||
abortQuiz: (game, io, socket) => {
|
||||
if (!game.started) {
|
||||
return
|
||||
}
|
||||
|
||||
if (socket.id !== game.manager) {
|
||||
return
|
||||
}
|
||||
|
||||
abortCooldown(game, io, game.room)
|
||||
},
|
||||
|
||||
showLoaderboard: (game, io, socket) => {
|
||||
if (!game.questions[game.currentQuestion + 1]) {
|
||||
socket.emit("game:status", {
|
||||
|
||||
Reference in New Issue
Block a user