My word game marks repeated letters wrong, and German letters do not match
A guess with a letter twice, or an answer with a letter twice, is where hint colours go wrong in almost every first version. Capital letters, umlauts and the sharp s add their own surprises. Here is the two-pass method for the colours and a safe way to compare words.
Why this works
Each letter in the answer can vouch for only one letter in the guess. Settling the exact matches first and then handing out what is left keeps a repeated letter from being praised twice, and bringing both words into one plain written form makes capitals and umlauts compare fairly.
When not to use it
Skip it when your game compares whole words without colouring single letters, or when the rules say an umlaut counts as its plain letter, as in some crossword styles. Then compare in the form your own rules state.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 34 lines of example code with 5 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "My word game marks repeated letters wrong, and German letters do not match" (read_entry word-guess-colors-wrong-with-repeated-letters) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP