Determining whether two words match is an important function for Dead Keys. When a player enters a word during combat, we must ascertain several features of that word compared to the chosen one from the word list:
Complete word matches: A complete word match occurs when the player fully and correctly types the selected word, letter for letter. This results in a zombie being killed and is a measure of progress in the scene. Detecting complete word matches is therefore important for progressing gameplay.
Failed matches: A failed word match occurs when the player's most recent keypress fails to match any selected words (there could be multiple zombies) and therefore invalidates any partial matches there may have been up to that point. When a failed match occurs, the player's input is reset and they must retype the word from the first letter.
Partial word matches: A partial match occurs when the player is on their way to entering and completing a word but has yet to type every...