From c9453178da0acf435c7e712a0d2750e26706dcfc Mon Sep 17 00:00:00 2001 From: Anson Biggs Date: Tue, 25 Jan 2022 20:01:45 -0700 Subject: [PATCH] make code easier to use --- wordle.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wordle.jl b/wordle.jl index 42b77a2..f7ecad2 100644 --- a/wordle.jl +++ b/wordle.jl @@ -58,12 +58,12 @@ end begin wrongs = [] - banned = "erahiync" |> collect - contained = "ulp" |> collect - knowns = "s...." |> collect |> enumerate - wrongs = [('s', 5), ('u', 2), ('l', 3), ('p', 4)] # (letter, index) + banned = "peniwtm" |> collect + knowns = "su..." |> collect |> enumerate + wrongs = [('s', 5), ('r', 3), ('s', 4)] # (letter, index) + # contained = "s" |> collect @assert length(knowns) == 5 - + contained = [contained; [w[1] for w in wrongs]] i = 0 for word in words if any(occursin.(banned, word))