From 99af47d0173a69aca9a4f7e2a6c15f91f6c6a572 Mon Sep 17 00:00:00 2001 From: bitscuit Date: Fri, 30 Dec 2022 20:51:51 +0100 Subject: [PATCH] updated category selection logic --- main.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 0a63433..1b311c6 100644 --- a/main.js +++ b/main.js @@ -56,6 +56,7 @@ var config = { answerPreview: true, timer: 60, }; +var enabledCategories = []; // Get question categories function isCategoryEnabledByDefault(id){ @@ -188,6 +189,14 @@ io.on("connection", (socket) => { userPoints.push(0); } + enabledCategories = []; + for(var i=0; i rand(0, 100)); + // Send game data var dataUser = {usernames:userNames, questionsTotal:questionsTotal}; for(i=0; i res.json()) // Convert to JSON .then(json => {