3 ms·
Oh wow, I never noticed that myself. I'll fix it once I'm at my computer, thanks for pointing it out! The fix will probably be something like if letter not
by ajusa 5y ago
Oh wow, I never noticed that myself. I'll fix it once I'm at my computer, thanks for pointing it out! The fix will probably be something like
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.
- anonymoushn 5y agoI don't think it's that simple. For HOUSE, guessing BEERS should get you WYWYW
- Aethylia 5y agoI have been trying to figure this out myself. The algorithm I'm using is to colour yellow only if the count of that letter before that occurance in the guess, is less than the count of that letter in the target word.
- joeframbach 5y agoLooks good, here are some test cases off the top of my head. 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"