Hello guys,
I am currently working on a word-guessing application similar to the game "Wordly." However, I am facing a challenge with implementing the string comparison logic. Specifically, I need to compare a predefined string (the target word) with a string entered by the player (the guessed word) and provide feedback using color-coded letters:
- Letters that match in the correct position should turn green.
- Letters that exist in the target word but are in the wrong position should turn yellow.
I am unsure how to implement this logic effectively in code to achieve the desired behavior. Could you please provide guidance or a recommended approach for handling this functionality? Eventually I was thinking about leds changing colors under a letter that is correct.
Thank you in advance for your support.