
Currently if the user re-enters the same character more often, the handling is right, so the guess count is not again decreased. That's cool. But anyway, you will execute the whole loop for replacing character again.
You could catch this case before entering again the loop, maybe do a short output to user, and use a continue to directly re-enter the main loop again.
Currently if the user re-enters the same character more often, the handling is right, so the guess count is not again decreased. That's cool. But anyway, you will execute the whole loop for replacing character again.
You could catch this case before entering again the loop, maybe do a short output to user, and use a continue to directly re-enter the main loop again.