by jaidhyani · 4y ago · 0 comments
I actually made the same mistake in a Wordle solver I was writing recently - it's easy to miss, since Wordle doesn't make this explicit and you have to infer it yourself.
if letter not in (.bg-warning in first .guess).innerText then add .bg-warning
Haven't tested as I'm on my phone, but seems like a simple enough fix.guess: "SASSY", target: "BRASS", expect either "YYBGB" or "BYYGB". I believe your algorithm would return "YYYGB".
guess: "BRASS", target: "SASSY", expect "BBYGY"
guess: "ASSET", target: "BRASS", expect "YYYBB"
guess: "BRASS", target: "ASSET", expect "BBYYY"