From cd049240ea75ee9a50db782edc58767cb2c8cf4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Wed, 23 Feb 2022 03:10:44 +0200 Subject: [PATCH] Limit targets to words at least as common as "murky" --- compress-targets.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/compress-targets.py b/compress-targets.py index 32b4975..bc17562 100644 --- a/compress-targets.py +++ b/compress-targets.py @@ -8,7 +8,14 @@ srcpath = sys.argv[1] targetpath = sys.argv[2] with open(srcpath, 'r') as f: - words = json.load(f) + all_words = json.load(f) + +# 'murky' is the rarest word we'll use +# https://github.com/lynn/hello-wordl/blob/7da40c1f067eb1ec157d4c5b7a9bd8257ed39342/src/Game.tsx#L34 +words = [] +for word in all_words: + words.append(word) + if word == 'murky': break # We only care about 5-letter words words = [word for word in words if len(word) == 5]