Ajout d'un maximum pour la longueur des mots dans Wordle
This commit is contained in:
@@ -15,6 +15,7 @@ WORDLE_TARGET_WORDS = "cambot/wordlists/target_words.txt"
|
|||||||
WORDLE_POINTS = (1, 3, 6)
|
WORDLE_POINTS = (1, 3, 6)
|
||||||
WORDLE_SLOWMODE = 0
|
WORDLE_SLOWMODE = 0
|
||||||
WORDLE_MINLENGTH = 8
|
WORDLE_MINLENGTH = 8
|
||||||
|
WORDLE_MAXLENGTH = 10
|
||||||
WORDLE_FORCE_ALTERNATION = True
|
WORDLE_FORCE_ALTERNATION = True
|
||||||
|
|
||||||
HEARTBEAT = 60
|
HEARTBEAT = 60
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class Game:
|
|||||||
output = ""
|
output = ""
|
||||||
if self.target and not self.winner:
|
if self.target and not self.winner:
|
||||||
output = f"Le mot précédent était : `{self.target}`\n\n"
|
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.winner = None
|
||||||
self.tries = 0
|
self.tries = 0
|
||||||
self.last_player = None
|
self.last_player = None
|
||||||
|
|||||||
Reference in New Issue
Block a user