Just as a diversion, I'd like to create an interactive Mathematica version of Wordle. As a sketch I have the following:
wordlist =
Import["https://gist.githubusercontent.com/cfreshman/a03ef2cba789d8cf00c08f767e0fad7b/raw/a9e55d7e0c08100ce62133a1fa0d9c4f0f542f2c/wordle-answers-alphabetical.txt", "List"];
word = Characters[RandomSample[wordlist, 1][[1]]];
wordle[string_] := Module[{guess, thread},
guess = Characters[string]; thread = Thread[{word, guess}];
Row[Table[
If[Length[DeleteDuplicates[thread[[t]]]] == 1,
Text[Style[DeleteDuplicates[thread[[t]]][[1]], Large, White,
Background -> Darker[Green]]],
If[MemberQ[word, guess[[t]]],
Text[Style[guess[[t]], Black, Large, Background -> Yellow]],
If[MemberQ[word, guess[[t]]] == False,
Text[Style[guess[[t]], White, Large, Background -> Gray]],
Text[Style[guess[[t]], White, Large,
Background -> Black]]]]], {t, 5}]
]];
(*wordle["stead"]*)
How can I make this sketch interactive?