From 9a060e3c6e256909e5f38331d3ca65c6d9dad770 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Tue, 7 Oct 2025 23:43:34 -0700 Subject: [PATCH] Update quiz.py --- modules/games/quiz.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/games/quiz.py b/modules/games/quiz.py index 9074ce8..2039b99 100644 --- a/modules/games/quiz.py +++ b/modules/games/quiz.py @@ -1,3 +1,13 @@ +# Quiz Module for meshbot 2025 +# Provides a quiz game function with multiple choice and free-text questions +# Quizmaster can start/stop the quiz, players can join/leave, answer questions +# Scores are tracked, first correct answer is noted, top 3 players announced at end +# Questions are loaded from a JSON file in data/quiz_questions.json +# Questions can be multiple choice (with answers array) or free-text (with answer string) +# Players answer with "Q: " format, "Q: ?" for next question, locked to DM +# unlike a normal game, players can join/leave anytime during the quiz but the QuizMaster needs to start or open game +# Quizmaster can broadcast messages to all players + import json import os import random