Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non-lowercase words handling in Hangman #10098

Open
wants to merge 3 commits into
base: content
Choose a base branch
from

Conversation

dreamscached
Copy link
Member

@dreamscached dreamscached commented Sep 23, 2023

tl;dr

Currently hangman only works with lowercase letters as guesses are only accepted as single ASCII lowercase letters and current logic is case-sensitive. This PR adds support for non-lowercase words with full proper handling.

Summary

Recently, I've seen one of the users ask (MAS Discord) why their hangman word was not guessed, even if they tried the letters correctly. They tried to guess the letter v, but their word (apparently, because of using German translation with translated word list where a titlecased word was found with uppercase V) had it in uppercase and the game didn't take the guess as correct:

screenshot of bug report

This PR resolves this issue and additionally, adds support for non-lowercase words that are handled properly and displayed properly (without forcing them lowercase):

half-guessed guessed fully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant