You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the played words are represented by a list, there are multiple error messages shown whenever a word that is a prefix of multiple played words is played.
For example, suppose the words PANGS and PANGRAM have been played. Then, suppose the next player plays the word PANG. In this case, two error messages that say, "That word can't be played," are shown - one for violating "PANGS", and the other for violating "PANGRAM". This gets worse if there's a lot of prefixes. For instances, suppose "HERONS", "HERON", "HERO", "HER", and "HE" have been played. If somebody tries to play "HE" again, there will be 5 error messages shown!
One way to fix this is by simply representing the played words as a prefix trie (or, by keeping track of whether a violation has already been reported)
The text was updated successfully, but these errors were encountered:
Since the played words are represented by a list, there are multiple error messages shown whenever a word that is a prefix of multiple played words is played.
For example, suppose the words PANGS and PANGRAM have been played. Then, suppose the next player plays the word PANG. In this case, two error messages that say, "That word can't be played," are shown - one for violating "PANGS", and the other for violating "PANGRAM". This gets worse if there's a lot of prefixes. For instances, suppose "HERONS", "HERON", "HERO", "HER", and "HE" have been played. If somebody tries to play "HE" again, there will be 5 error messages shown!
One way to fix this is by simply representing the played words as a prefix trie (or, by keeping track of whether a violation has already been reported)
The text was updated successfully, but these errors were encountered: