Hi OldDauber,
Thanks for the note. I reverted back to the course code after your snippet wasn’t working, so here it is as it stands now:
FBullCowCount FBullCowGame::SubmitGuess(FString Guess)
{
// incriment the turn number
MyCurrentTry++;
// setup a return variable
FBullCowCount BullCowCount;
// loop through all letters in the guess
int32 HiddenWordLength = MyHiddenWord.length();
for (int32 MHWChar = 0; MHWChar < HiddenWordLength; MHWChar++) {
// compare letters against the hidden word
for (int32 GChar = 0; GChar < HiddenWordLength; GChar++) {
// if they match then
if (Guess[GChar] == MyHiddenWord[MHWChar]) {
if (MHWChar == GChar) { // if they're in the same place
BullCowCount.Bulls++; // incriment bulls
}
else {
BullCowCount.Cows++; // must be a cow
}
}
}
}
return BullCowCount;
}
I think it’s worth mentioning for anyone else that may be thinking about taking lessons with these people that I actually needed to spell-correct this code even though I took it directly from the lesson snippet on Github. Just one of numerous, numerous mispellings and mistakes which litter the slides and code from what is turning out to be the sloppiest and worst course on Udemy I have ever taken. Length was spelled incorrectly for probably the tenth time since I’ve started the course - the supposedly native english speakers who give it cannot spell the words “Increment”, “Hidden”, “Length” and various other words that any 10 year old of average intelligence can spell and type.
That being said - using the code above crashes in the same manner when I attempt to type in a three letter word.
I’d appreciate any help that can be offered, but I’d appreciate even more an explanation from the authors on why they have offered no solution for this and why they are still silent on this thread that is over twenty posts long, and then offer an answer that actually works.