The code is just minimized for prod..
The article as written makes it sound like the developer(s) intentionally wrote their code cryptically, whereas minimization for deployment is fairly standard practice
Interestingly you can still view the unminified source, since create-react-app generates source maps by default.
[0]: https://developers.google.com/closure/compiler/docs/compilat...
But not 19th of May 2021, but 20th of June 2021
Every time I look as JavaScript, I find a new reason to hate it.
What I would find cool is derivation of the best strategy at any time. Just like blackjack, there should be a “best” move at all times , and it would be cool to measure yourself against that
[0] https://blog.scubbo.org/posts/cheating-at-word-games/ [1] https://blog.scubbo.org/posts/cheating-at-word-games-part-3/
https://github.com/jbchouinard/untitled-word-game
https://en.wikipedia.org/wiki/Mastermind_(board_game)#Best_s...
Surely it differs from Mastermind (which I might not be remembering well as I didn't like it) in that the answers must be words in the game's dictionary rather than arbitrary colour codes? That seems to change tactics considerably.
It's not optimal at all, but works for every wordle word; it's built by finding the word (guess) that minimizes the maximum size of the possible words (to guess), a bit like Knuth Algorithm for Mastermind.
For an optimal strategy, a backtracking solution with pruning / maybe a branch and bound approach would work, but I didn't manage to implement a fast enough implementation for my small 8 threads CPU.
When you submit a guess, it checks to see if your guess is in either array (or at least that's how I implemented it). And just does some relatively simple string comparison.
Your progress is just stored in local storage. You can blow your data away by deleting it via dev tools.
My version just lets you try again by refreshing, I'm not storing any data.
The viral factor of the original Wordle, IMO, is the share function and the little emoji grid it generates.
Yes, that is really genius. That's what made me to wonder what this game was about.
No offense to the author but I am kinda confused why someone would even open the inspector and be like: "how is this being done?!"
Kids these days.
When I was young I would disassemble anything with a circuit board. The Nintendo, the garage door opener... parents drew the line at the VCR though.
And https://ath3nd.wordpress.com/2022/01/11/about-wordle/
The idea with the game is to have fun, not to make it impenetrable for techies (in which case a backend would have been nice)
They had all the answers stored in the source code. I wrote up a quick perl script to play the game and unfortunately left it running overnight, and in the morning there were complaints from other players asking how I'd reached the top rank so quickly.
I thought I would do a programmatic soltion because that was the only win I will be able to get. I did find it interesting that they had all the 5 letter words in the frontend logic.
I've seen quite a few blogs/tools all trying to surf the wave of Wordle.
https://www.macrumors.com/2022/01/11/wordle-app-store-clones...