Cadiac / sanuli

A finnish version of a popular word guessing game, written in Rust.
https://sanuli.fi
MIT License
64 stars 6 forks source link

Letter input highlights do not take into account already placed letters #26

Closed vjrasane closed 2 years ago

vjrasane commented 2 years ago

IMG-20220704-WA0000.jpg

The second S in the image is highlighted as wrongly placed even though the only known S is already in its correct position. Intuitively, the second S should not be highlighted as it is not known.

Cadiac commented 2 years ago

It is shown in yellow as you don't know at that point if the word contains more than one copy of "S".

If you had already made a guess with two "S" letters or a guess with "S" at that position it would be shown as dark grey, now that position still could be "S" and thus it is (correctly) shown in yellow.

vjrasane commented 2 years ago

Why show it as yellow if it is not known to exist?

It is shown in yellow as you don't know at that point if the word contains more than one copy of "S".

By the same logic the Ö should be yellow since we don't know at this point wether the word contains more than zero copies of Ö.

The second S should be light grey like the Ö since there is no information about it yet.

Cadiac commented 2 years ago

Why show it as yellow if it is not known to exist?

Its shown in yellow because its know that the letter exists in the word, at least at the first position. The second S is shown in yellow here just to remind the user that there's S somewhere.

"Ö" isn't shown in yellow since we know nothing about that letter yet. If we knew that the word has no Ö it would be shown with dark grey border.

Anyways, this is the logic the helper highlighter works in this game, and at this point I don't think its ever going to change.