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"