I'm making a hangman game,
I'm just about completely done but the one thing that doesn't work is if the user, for input, presses the enter key, it just says they win.
So I've been trying to find ways to detect the enter input, and then from there just continue back to the while loop.
I've tried doing if guess == ord(13): print("Please enter a letter.") continue
and if guess == '\r' print("Please enter a letter.") continue
neither really work,
and for some reason, it goes into my for loop, iterating through thinking that it is inside my answer word even though my answer word is .. a word and not any enter keys and essentially filling the list and making it win the game, so have to find a way to detect the enter key.
Any ideas?
Aucun commentaire:
Enregistrer un commentaire