I really like the way you have designed your code.
You check for many things such as looking to see if the input from the user is anything other than letters. I do enjoy the way you’ve coded it, however, I feel that you could make the code less redundant by checking if the hidden word and guess have different sizes just in one statement such as this:
if (Guess.length() != getHiddenWordLength()) { return EGuessStatus::Not_Correct_Length; }
Also you could create a function that checks every index of the guess to see if any characters are not letters, rather than checking if they are numbers and checking if there is punctuation.
A simple Vector filled with the alphabet would allow you to check quite easily with a for loop that all characters in guess are letters.
Aside from that you have some great ideas
Keep it up!
Using GuessLength enforces only a single call to Guess.Length() because of my need to test length twice.
The < & > were specifically chosen for more resolution on the error. I want to know if the user is guessing too long or too short. There’s nothing wrong with using length != guess length; it just didn’t suit what my requirements were.
using != is far more neater than what I showed
I don’t know why I didn’t just type that instead of a big if statement the way I did.
I will update my reply now, thanks for pointing it out
In general though you may need to use both > and < in an if statement rather than using != later down the track usually when comparing more than two variables
No, my point was that the consumer of this function, a logic or behavior block, could respond differently if the response of the function allows it to. If I want the rest of the application to be able to respond to different user scenarios that are important in its design, then these ‘medium level’ functions have to provide the required resolution for higher level actions to occur. If it’s just ‘!=’, then that cripples logic higher up. It’s not so important here - it’s just a word comparison - and I wanted that amount of resolution. But on a vector comparison, it really becomes important to give proper feedback to the caller (view point of the function) to be able to react correctly.