Here’s my game loop - I removed the part about matching the length of the word.
if (bGameOver)
{
ClearScreen();
SetupGame();
}
else //check Player guess
{
if (Input == HiddenWord)
{
PrintLine(TEXT("Congratulations, you WIN!"));
EndGame();
}
else
{
PrintLine(TEXT("Wrong answer, you lose a life!"));
PrintLine(TEXT("You now have %i lives left."), --Lives);
if (Lives == 0)
{
PrintLine(TEXT("You have lost all your lives"));
PrintLine(TEXT("-- GAME OVER --"));
EndGame();
}
}