From 7861fd339c8dbc0dc1f8765e1ab8912a2e6bf712 Mon Sep 17 00:00:00 2001 From: tsmith372 Date: Tue, 17 Feb 2026 13:34:46 -0500 Subject: [PATCH] Finished the code it should work now --- api.py | 2 +- client.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api.py b/api.py index d3e4c67..e5676db 100644 --- a/api.py +++ b/api.py @@ -49,7 +49,7 @@ class RiddleAPI: riddles = self.get_all_riddles() if len(riddles) == 0: raise APIError(["Sorry, there are no riddles on the server!"]) - return random.choice(riddles) + return choice(riddles) def add_riddle(self, question, answer): diff --git a/client.py b/client.py index 7facc6d..c44bf6f 100644 --- a/client.py +++ b/client.py @@ -4,6 +4,7 @@ # RiddleView provides a nice user interface for guessing riddles. from api import RiddleAPI +import requests class RiddleView: "Allows a player to interact with a Riddle Server from the Terminal"