Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAdiv Abramson
6,919 PointsEven though Java is case sensitive, shouldn't the Prompter class be made case insensitive, for ease of use?
In its current iteration, the Prompter class won't accept any capital letter from the user input as a hit. I would imagine that for ease of use considerations the class should not care about the case.
If such a feature were implemented, how would it be done? Perhaps convert the string to be guessed when instantiating a Game object into all lowercase and do the same for any letters inputted by the user. I think for a char variable we can use myChar.toLowerCase() and for a String variable we can use myString.equalsIgnoreCase(myOtherString) for a case insensitive comparison, or myString.toLowerCase().equals(myOtherString.toLowerCase()).