From 1dc4cb8b78fb983123229fccd6d5d7f77c30f685 Mon Sep 17 00:00:00 2001 From: Auric Vente Date: Thu, 25 Jul 2024 21:50:36 -0600 Subject: [PATCH] Mods --- cromulant/game.py | 2 +- cromulant/utils.py | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/cromulant/game.py b/cromulant/game.py index da4e6e9..5937b89 100644 --- a/cromulant/game.py +++ b/cromulant/game.py @@ -309,7 +309,7 @@ class Game: elif n == 2: status = Utils.random_emoji(3) elif n == 3: - status = Utils.random_words(1)[0].capitalize() + status = Utils.random_word(noun=True, adj=False) elif value == Opts.words.value: n = random.randint(1, 4) diff --git a/cromulant/utils.py b/cromulant/utils.py index 9eca23c..f49e666 100644 --- a/cromulant/utils.py +++ b/cromulant/utils.py @@ -173,12 +173,16 @@ class Utils: return "" word = Utils.rand_word.word(include_parts_of_speech=opts, word_max_length=8) - return str(word) @staticmethod - def random_words(num: int = 1) -> list[str]: - return [Utils.random_word() for _ in range(num)] + def random_words(num: int = 1, noun: bool = True, adj: bool = True) -> list[str]: + return [ + Utils.random_word( + noun=noun, + ) + for _ in range(num) + ] @staticmethod def capitalize(word: str) -> str: