Ajout d'un maximum pour la longueur des mots dans Wordle

This commit is contained in:
2022-10-03 11:12:36 +02:00
parent 4f89c1bf31
commit 5bf7676b68
2 changed files with 3 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ class Game:
output = ""
if self.target and not self.winner:
output = f"Le mot précédent était : `{self.target}`\n\n"
self.target = random.choice(tuple(x for x in target_words if len(x) >= WORDLE_MINLENGTH))
self.target = random.choice(tuple(x for x in target_words if WORDLE_MAXLENGTH >= len(x) >= WORDLE_MINLENGTH))
self.winner = None
self.tries = 0
self.last_player = None