diff --git a/src/wordle.py b/src/wordle.py index de2c35e..f2d5c2f 100644 --- a/src/wordle.py +++ b/src/wordle.py @@ -55,7 +55,7 @@ class DictionaryProvider: l = [] if not filter_fun: filter_fun = lambda s: True - with open("/home/max/Desktop/clean-words-5.txt") as d: + with open("/usr/share/dict/words") as d: return [ word for word in filter(filter_fun, map(lambda w: w.strip(), d.readlines())) @@ -66,9 +66,8 @@ class DictionaryProvider: return ( len(word) == length and all(map(lambda x: x in string.ascii_lowercase, word)) - and not all(map(lambda c: c in "xiv", word)) - # and (word.startswith("s") or word.startswith("z")) - ) # hack to remove some roman numerals + and not all(map(lambda c: c in "xiv", word)) # hack to remove some roman numerals + ) return f @@ -109,7 +108,6 @@ class WordleRemainingWordsStateEvaluator: Get a score for the given word state """ - # Score values are totally arbitrary. This will be improved in the future based on the remaining selections return -sum([1 for word in self.dictionary if self.word_playable.is_word_playable(state, word)]) @dataclass