So you guys are probably going to yell at me for my programming lol I just finished the Bulls & Cows section and decided to play with the code as much as possible before moving on to make sure I grasp everything.
So my idea was to have every character of the hidden word showed as asterisks so let’s say the hidden word was table it would show " * * * * * ". Then instead of bulls the right character would show so if you entered tesla it would print " t * * l * " .
So this is the lines of code I came up with to test the idea but it completely crashes UE so I’m obviously doing something horribly wrong but what is it?
Blockquote
FString Pass;
for (int32 Indexz = 0; Indexz < HiddenWord.Len(); Indexz++)
{
if (HiddenWord[Indexz] != Guess[Indexz])
{
Pass[Indexz] = '*';
}
else {
Pass[Indexz] = HiddenWord[Indexz];
}
}
PrintLine(TEXT("%s"), *Pass);
Blockquote