I added a few things like a previous guess text that will display your last guess and also your last wrong guess…
and i added an alphabetic letter check…
FBullCowGame.cpp
bool FBullCowGame::IsAlphabetic(FString Word) const {
TMap<char, bool> LetterAlphabetic;
for (auto Letter : Word) {
if (isalpha(Letter) == 0) {// if is an alphabetic letter then go to next letter in TMap
return false;
}
else {} // if empty will keep checking the rest of the word and not stop after the first letter checked
}
return true;
}
this will go through the whole word and only return an error if not a-z isalpha() returns a bool value so i check it for 0 and if it is it returns a false so the function can keep checking the rest of the word.