Hi,
First - thank you all for the great course.
Second, here is my definition of the IsIsogram:
bool UBullCowCartridge::IsIsogram(FString Word) const
{
for (int32 i=0; i<Word.Len(); i++)
{
PrintLine(TEXT("%c"), Word[i]);
}
return true;
}
And in different place the execution:
void UBullCowCartridge::ProcessGuess(FString Guess)
{
if (!IsIsogram(Guess))
{
PrintLine(TEXT(“No repeating letters, guess again”));
return;
}
…
Question is, why do i see loop printed letter of the Word in the terminal? I mean, it’s working like in the video, but i do not understand why. In ProcessGuess we are not executing IsIsogram itself, we only check if it returns true or false for a given argument. In my understanding result of this line:
PrintLine(TEXT("%c"), Word[i]);
should not be visible in the terminal (because Its executed in if statement, but only to check if it returns true or false, in my understanding only “No repeating letters, guess again” should be printed), but it is. Hope I expressed my problem clearly