This is my code now

What do you think?

void UBullCowCartridge::ProcessGuess(FString Guess)
{
if(Guess == HiddenWord)
 {
 ClearScreen();
 PrintLine(TEXT("The HIdden word was %s "),*HiddenWord);
 PrintLine(TEXT("*** You Win ***"));
 EndGame();
 return;
 }
 

 if (Guess.Len() != HiddenWord.Len())
  {
  PrintLine(TEXT("THe Hidden Word not %i Characters "),Guess.Len());
  PrintLine(TEXT("Try Again with %i Characters "),HiddenWord.Len());
  return;   
  }
/*  else if (!IsIsogram)
 {
   PrintLine(Text("NO repeating letters , guess aggain")); */
 else
  {
    -- Lives;
    if (Lives>0)
     {
     PrintLine(TEXT("Wrong Answer"));
     PrintLine(TEXT("You lost a life \n You have now %i "),Lives); 
     return;
     }
    else
     {
     ClearScreen();
     PrintLine(TEXT("Wrong Answer")); 
     PrintLine(TEXT("  You lost game  "));
     PrintLine(TEXT("\nThe HIdden word was %s "),*HiddenWord);
     EndGame();
     return;
     }
          
  }
}

Privacy & Terms