Closed sid-1698 closed 2 years ago
Have you tested this against the following example? Word: AABBA Guess: BABBA Correct Answer: ⬛🟩🟩🟩🟩
I noticed that the old wordle website follows the behavior coded in the original algorithm. However, after they've moved to the New York Times website, it now handles duplicates differently, ie. it no longer colors a duplicate letter if it's already been consumed by another position.
Anyone else noticed that too?
The issue didn't seem to get fixed by this, see details in issue#35.
I ended up fixing this in a different way, but thank you!
When there's a duplicate in our guess but there's no or less duplicates in the original word, it should be handled effectively.
Scenario 1: When the first instance is at the correct position Word: ABCDE Guess: ABACB
Current implementation shows:
Whereas, it should ideally be
Scenario 2: When the first instance is at the wrong position Word: ABCDE Guess: BADAE
Current implementation shows:
Whereas, it should ideally be
Special Cases: When the duplicate count is less in the actual word than guess Word: ABBCD Guess: ABCBB
Current implementation shows:
Whereas, it should ideally be