From 0dafb8994aace42542088f733f06fcea73b210d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Lau=C3=9Fmann?= Date: Mon, 12 Feb 2024 14:53:30 +0100 Subject: [PATCH] FIX: Only throw error if player count is LESS than question count --- pyteamquiz/game.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyteamquiz/game.py b/pyteamquiz/game.py index 1a1f7b5..770f094 100644 --- a/pyteamquiz/game.py +++ b/pyteamquiz/game.py @@ -26,7 +26,7 @@ def __init__(self, catalgogues:Set[QuestionCatalogueFile], teams:Set[str]): raise TeamNameError("Team name must be between 1 and 30 chars.") # Ensure each player gets the same number of questions - if len(self.questions) <= len(self.teams): + if len(self.questions) < len(self.teams): raise NotEnoughQuestionsError("You have fewer questions than teams. Select more catalogues.") pick_questions = len(self.questions) - len(self.questions) % len(self.teams) self.questions = self.questions[:pick_questions]