Here’s a little wordle clone I wrote using words from the POSIX API and command-line as its dictionary. This was an exercise in just writing a straight-forward client-side web app. It’s a single HTML file that comes over the wire at about 3.8k. This is without even stripping comments from the source.
Nice! One note, though, is that in its current form it doesn’t match the standard rules of Mastermind scoring (which Wordle also follows) – specifically the requirement that each element can only match once. Thus for example if the answer is
chdir
and I guesscacos
, then the first “c” should be marked green, but the second “c” must go unmarked. (On the other hand, if the answer isrmdir
and I guesserrno
, then both “r”s should be marked yellow.)Yeah I think I failed the first challenge because of this… I got pretty close but I thought there were 2 e’s because of the way it’s scored. But there is only 1 e.
Okay, thanks, now I don’t have to comment about failing because two e’s.
I did have a TODO in the code, but I’ve finally fixed it. Sorry!
I enjoyed this, thanks! And got massively lucky:
Wordlix 🟩🟩🟩🟩🟩
Time to buy a lottery ticket now
That was fun and a lot harder than I expected. It’s tricky having such a limited dictionary, thanks for sharing!
Frustratingly fun >:| Thanks!
Succeeded in the last attempt, but got a “Better luck next time” message.
Yeah I had the same happen to me
Oh noes. I just fixed that.
I must say, this game has taught me that POSIX defines a surprising number of higher math functions.
I loved it. However the share didn’t seem to work. I tried to share to clipboard on Firefox Android and just got:
Worse when I went back j didn’t have the option to try again!
I just reproed that. Firefox Android seems to have a weird
navigator.share
implementation.Ugh, it looks like Firefox on Android exposes a
navigator.share
property but it doesn’t actually work: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share#browser_compatibilityI have no interest in implementing any browser-specific hacks in this little project. I test for the feature and fall back to the clipboard. Hopefully Mozilla will fix this in the browser some day.
Strange. It seems to lsrtly work but I guess not fully?
Going to about:config and setting dom.webshare.enabled=false is enough to trigger your fallback. I guess we can’t expect you to do anything more.
Wordlix
🟨⬜🟩🟨⬜
🟩🟨🟩🟨⬜
🟩🟩🟩🟩🟩
Wordlix
⬜⬜⬜🟨🟨
⬜⬜🟨⬜⬜
⬜⬜⬜🟩🟨
🟩🟩🟩🟩🟩