Maybe it will be helpful for someone who has the exception “String subscript out of range”.
Upgrade for loop (4th line here) in SubmitGuess method with additional condition ‘&& GChar < Guess.length()’ to avoid that exception:
for (int32 MHWChar = 0; MHWChar < HiddenWordLength; MHWChar++)
{
// compare letters against the hidden word
>>>>for (int32 GChar = 0; GChar < HiddenWordLength && GChar < Guess.length(); GChar++)
{
// if they match
if (Guess[GChar] == MyHiddenWord[MHWChar])
{
// if they're in the same place
if (GChar == MHWChar)
{
// incriment bulls
BullCowCount.Bulls++;
}
else
{
// incriment cows
BullCowCount.Cows++;
}
}
}
}