bool FBullCowGame::IsIsogram(FString Word) const
{
TMap<char, bool> LetterSeen;
if (Word.length() > 1) {
for (auto Letter : Word) //foreach
{
Letter = tolower(Letter);
if (LetterSeen.count(Letter)) {
return false;
}
else {
LetterSeen[Letter] = true;
}
}
}
return true;
}
OK here’s mine, it’s similar and it seems to work. I like your combining the character length check into that line, neat !
The only thing that we haven’t implemented yet is that the guess word and hidden word still have to case match.
Onwards !