wordle/lib.py
2022-01-17 11:24:32 +01:00

17 lines
494 B
Python

DEBUG = False
WORD_LENGTH = 5
ROUNDS = 6
INSTRUCTIONS = "Positional letters (green) are CAPITAL, non-positional (yellow) are small, others are blanks e.g. SHe-r"
BLANK = "-"
def cat_words():
with open('/usr/share/dict/words') as f:
for word in f.readlines():
# remove end of line
word = word[:-1]
# filter out five letter words
if len(word) == WORD_LENGTH and "'" not in word and not word[0].isupper():
yield word