# Making a Mathematica version of Wordle interactive

Just as a diversion, I'd like to create an interactive Mathematica version of Wordle. As a sketch I have the following:

wordlist =
word = Characters[RandomSample[wordlist, 1][[1]]];
Row[Table[
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}]
]];



How can I make this sketch interactive?

• Not a particularly helpful comment - but it might do to explain what Wordle is. I have never heard of it and I just asked my wife, stepdaughter and stepson and they have never heard of it either. Commented Jan 16, 2022 at 14:07
• Wordle is a popular word game in which you try to discover a 5-letter word by guessing other 5-letter words, with a mechanic somewhat similar to the schoolroom game hangman. Commented Jan 16, 2022 at 14:21
• A WL Wordle implementation on the Wolfram Community site. Commented Jan 16, 2022 at 18:29

This is a very minimal interactive wireframe to get you started.

DynamicModule[{words = {}, word = ""},
Column[{
Dynamic@Column@words,
Row[{
InputField[Dynamic[word], String],
Button["Submit", AppendTo[words, wordle[word]]; word = ""]
}]}]]


• many thanks! :) Commented Jan 16, 2022 at 14:56

Feel free to take a look at this on the Wolfram community that I did for fun:

a facsimile of Wordle

Moderators: update… I did not see that a link to this was added as a comment above. I am leaving this one as well, but feel free to change it to a comment or to delete it as you see fit. Thanks!

• lots of fun to play with, thanks! :) Commented Jan 17, 2022 at 2:00
• Thanks! Enjoy! I recently added some additional explanatory text to the notebook. Commented Jan 17, 2022 at 3:11
• And here is a small blog post that I was asked to write: blog.wolfram.com/2022/02/04/wordle-the-wolfram-way Commented Feb 4, 2022 at 20:56