csalinas-dev / csalinas-dev-site

Personal Portfolio Site at https://csalinas.dev
https://csalinas.dev
0 stars 0 forks source link

fix(wordle): specific double letter case being added to not present array #37

Closed kaylittle6 closed 7 months ago

kaylittle6 commented 7 months ago

image

The 2nd E in TEETH is likely being added to the not present array, causing logic to fail on any successive guesses

Need to adjust logic to account for this type of scenario

csalinas-dev commented 7 months ago

Me too :( image

csalinas-dev commented 7 months ago

While building the absent, present, and correct fields from the board, check if the absent letter is already in the present set. If so, add the index to that set. Otherwise, continue on adding it to the absent list.