Zaktualizuj 'Projekt2/hangman.py'

This commit is contained in:
Łukasz Korbanek 2019-03-08 21:22:44 +00:00
parent 78d7f05c28
commit 8b4ceb9836

View File

@ -50,21 +50,21 @@ def n_main():
print("\nGratulacje. Wygrales!") print("\nGratulacje. Wygrales!")
break break
print("----------------------------------------") print("----------------------------------------")
print("\nPozostalo prob = {}".format(tries)) print("\nPozostalo prob: {}".format(tries))
guess_word = user_input() guess_word = user_input()
if guess_word in guess_word_list: if guess_word in guess_word_list:
print("Podano wczesniej") print("Podano wczesniej.")
continue continue
if guess_word.isdigit(): if guess_word.isdigit():
print("Cyfry sa niedozwolone") print("Cyfry sa niedozwolone!")
continue continue
if len(guess_word) != 1: if len(guess_word) != 1:
print("\nDopusczalne tylko pojedyncze znaki\n") print("\nDopusczalne tylko pojedyncze znaki.\n")
continue continue
guess_word_list.append(guess_word) guess_word_list.append(guess_word)
guessed_line = type_guess_word(s_word, guess_word,guessed_line) guessed_line = type_guess_word(s_word, guess_word,guessed_line)
print (guessed_line) print (guessed_line)
print ("Odgadles ={}".format(guess_word_list)) print("\n\033[1;32;40m Odgadles: {}".format(guess_word_list))
print("========================================") print("========================================")
tries = tries-1 tries = tries-1
if (tries < 1): if (tries < 1):