This commit is contained in:
Auric Vente 2024-07-25 21:50:36 -06:00
parent 962f59d794
commit 1dc4cb8b78
2 changed files with 8 additions and 4 deletions

View File

@ -309,7 +309,7 @@ class Game:
elif n == 2: elif n == 2:
status = Utils.random_emoji(3) status = Utils.random_emoji(3)
elif n == 3: elif n == 3:
status = Utils.random_words(1)[0].capitalize() status = Utils.random_word(noun=True, adj=False)
elif value == Opts.words.value: elif value == Opts.words.value:
n = random.randint(1, 4) n = random.randint(1, 4)

View File

@ -173,12 +173,16 @@ class Utils:
return "" return ""
word = Utils.rand_word.word(include_parts_of_speech=opts, word_max_length=8) word = Utils.rand_word.word(include_parts_of_speech=opts, word_max_length=8)
return str(word) return str(word)
@staticmethod @staticmethod
def random_words(num: int = 1) -> list[str]: def random_words(num: int = 1, noun: bool = True, adj: bool = True) -> list[str]:
return [Utils.random_word() for _ in range(num)] return [
Utils.random_word(
noun=noun,
)
for _ in range(num)
]
@staticmethod @staticmethod
def capitalize(word: str) -> str: def capitalize(word: str) -> str: