187 points · by conradludgate · 4y ago · 78 comments
let mut diff = [Match::Black; 5];
for (i, &b) in input.iter().enumerate() {
if solution[i] == b {
diff[i] = Match::Green;
} else if solution.contains(&b) {
diff[i] = Match::Amber;
}
}
If the solution is "crest", for example, guessing "class" should give green for the first s and black/grey for the second s, but your implementation will give amber for the second s. And if you guess "stars", then only the first s should be amber, and the second should be black.IMO, this is something that ought to be called out in a hypothetical formal specification of Wordle, but I kind of like that it isn't mentioned in the instructions for the game, from a gameplay/learning perspective. It encourages people to reason through what the correct behavior ought to be on their own, and to experiment to see how the implementation marks guesses; the assumption that letters can't be repeated is one that a lot of people don't realize that they're making.
https://news.ycombinator.com/item?id=30174386
https://news.ycombinator.com/item?id=30086083
https://news.ycombinator.com/item?id=29964725
https://news.ycombinator.com/item?id=29947881
https://news.ycombinator.com/item?id=29828652
Sigh... this game has ruined 5 letter words for me. Saw it and immediately thought "how's that for an opener?"
https://github.com/cwackerfuss/word-guessing-game/blob/49279...
It's probably not flawless and doesn't have any leaderboard/statistics saving yes, but it does the job.
It uses the official word list and order, so every day should match the website. It prints the emoji share upon finish too, so you can share as you would normally
That said, being not unfamiliar with Rust, i did indeed notice crates.io :)
I know you cut out lots of features for simplicity, which makes total sense to me if your goal was to finish & ship it, but if you wanted to add the wordle keyboard &c, you might look into using `tui`.
Web assembly and WGPU are coming and when they do it will be the next paradigm after mobile apps. But in order to get to this new glorious paradigm it is necessary for people to be capable of recognizing the value of software even if it’s in the browser and of using it on the scale seen with wordle. It’s just as likely that people would turn their nose up to a browser based software and everything would remain stagnate. So I am glad.
No thanks.
echo abcdefghijklmnopqrstuvwxyz | tr -d 'adieu'
I do this anyway, because instead of the normal order I put the alphabet in frequency order, so I get the list of letters in the order I should be considering them.
It's possible to "cheat" quite a bit using the shell. Exactly what does and doesn't count as "cheating" is up to your personal comfort level. For example, the frequency analysis of the official wordle word list is rather different than English at large...
When I saw the first letter was C I totally thought that was what the author had done.
I published one too[0] which is much clumsier - it needs to be interacted via wordlers. Of course mine is more for trying out an algorithm or two for solving. But it also allows one to play cows and bulls[1].
[0] https://crates.io/crates/wordlers [1] https://en.wikipedia.org/wiki/Bulls_and_Cows
Once it makes it to the MSM, that makes it officially uncool.
https://epic.blog/hacking/2022/01/26/cracking-the-wordle-gam...
Was terdle already being used?