mirror of
https://gitlab.com/MisterBiggs/wordle.jl.git
synced 2025-06-15 14:26:38 +00:00
make code easier to use
This commit is contained in:
parent
285ee90d82
commit
c9453178da
10
wordle.jl
10
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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user