My role: engineering, design, QA, art
Genre: Word puzzle game
Engine: Godot
Language: GDScript
Time period: 3 weeks
Team size: solo
Word Wall is a teaching tool based on the popular NYT game, Wordle. The game allows for more flexibility for classroom use, such as the ability to input your own word of varying lengths.
In Wordle, meaning is conveyed through color. When you make a guess, the color of the letters help guide you to the answer:
Black - not in the word
Yellow - in the word but not in the correct spot
Green - correct letter in the correct spot
In particular, I realized the logic for coloring in the guess letters and coloring in the keyboard letters needed to be separate. The keyboard coloring followed the Finite State Machine below. It was relatively simple because the number of letters doesn't matter, and the letters can't move "backwards" (e.g. when a letter becomes green it can never change back to yellow or white).
Coloring the guesses was much more challenging because it needed to take the number of letters into account, too (for example, in the word START there are 2 T's, see right image). In order to solve this, I first counted every letter in the answer and the guess, then compared the two to find the minimum value of each letter that they shared to create a shared counter. Then I iterated through the guess word and whenever a letter appeared, I deducted 1 from that counter.
The code can be found here on GitHub in the _on_enter_key_pressed() function.