Minor issue that's worked around later

I’ve include a screenshot of what I think is a logical error. We’re retrieving the character using the index ‘GChar’ of the word stored in guess “guess”. However, the iterator goes up to the length of the hidden word. I know this is later worked around by making sure that the guess and hidden word are always the same before calling the function, but as I’ve learned, we should try to make functions work independently. It seems for the highlighted “WordLength”, we should use Guess.Length() instead/

I believe Ben makes this function on the assumption that the function will never be called with a Guess length that doesn’t equal the HiddenWord length due to the error checking that happens before this function gets called

Privacy & Terms